Synchronize gitter and IRC

Synchronize gitter and IRC

gitter (https://gitter.im/) is like chat for GitHub and IRC (https://en.wikipedia.org/wiki/Internet_Relay_Chat)
is a very old and efficient way to communicate with text. The usage of IRC is very powerful and the suitable tool if you
are a person who lives in the terminal. gitter has a nice user interface, it's easier to use (just sign with your
github credentials and you are ready) and saves your chat history.

Learn in this talk how you can take synchronize message either written in IRC or gitter - it doesn't matter which
tool you use.

Dc708e96bc09d605a0a9fcad26ff6035?s=128

Matthias Günther

May 12, 2016
Tweet

Transcript

  1. Synchronize gitter and IRC

  2. gitter and IRC gitter is like chat for GitHub and

    IRC is a very old and efficient way to communicate with text.
  3. Demo time Just let you show something ..

  4. Prior conditions Create heroku profile, and get gitterbot api token

    from https:// developer.gitter.im/apps.
  5. Get the code Go to https://github.com/finnp/ gitter-irc-bot and click on

    deploy to heroku.
  6. Saving credentials var opts = { ircServer: "irc.freenode.net", ircChannel: "#padrino",

    ircNick: "padrinobot", ircAdmin: "wikimatze", ircOpts: getIrcOpts(), gitterApiKey: "<you-gitter-apikey>", gitterRoom: "padrino/padrino-framework" }
  7. Hosting on uberspace uberspace is a German based hosting company

    where you decide what you want to pay. $ ssh fomalhaut.uberspace.de -l padrino [padrino@fomalhaut ~]$ git clone https://github.com/vimberlin/vimberlinbot.git [padrino@fomalhaut ~]$ cd vimberlinbot && ./bin.js
  8. Creating a permanent bot as a daemon You need to

    create a daemon https://wiki.uberspace.de/ system:daemontools) [padrino@fomalhaut ~]$ test -d ~/service || uberspace-setup-svscan Creating the /etc/run-svscan-padrino/run script Symlinking /etc/run-svscan-padrino to /service/svscan-padrino to start the service Waiting for the service to start ... 1 2 3 4 5 started! Congratulations - your personal ~/service directory is now ready to use!
  9. Create a service [padrino@fomalhaut service]$ uberspace-setup-service vimberlinservice npm start Creating

    the ~/etc/run-vimberlinservice/run service run script Creating the ~/etc/run-vimberlinservice/log/run logging run script Symlinking ~/etc/run-vimberlinservice to ~/service/vimberlinservice to start the service Waiting for the service to start ... 1 2 3 started! Congratulations - the ~/service/vimberlinservice service is now ready to use! To control your service you'll need the svc command (hint: svc = service control):
  10. Edit the job [padrino@fomalhaut]$ vim ~/service/ vimberlinservice/run #!/bin/sh # These

    environment variables are sometimes needed by the running daemons export USER=padrino export HOME=/home/padrino # Include the user-specific profile source $HOME/.bash_profile # Now let's go! cd /home/padrino/vimberlinbot && exec /usr/local/bin/npm start
  11. Start the service: [padrino@fomalhaut]$ svc -u ~/service/vimberlinservice

  12. Delete the daemon [padrino@fomalhaut]$ cd ~/service/vimberlinservice [padrino@fomalhaut service]$ rm ~/service/vimberlinservice

    [padrino@fomalhaut service]$ svc -dx . log [padrino@fomalhaut service]$ rm -rf ~/etc/run-vimberlinservice
  13. Who am I @wikimatze writing @padrinobook running @vimberlin updating @padrinorb

    and …
  14. One last thing