Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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.

Matthias Günther

May 12, 2016
Tweet

More Decks by Matthias Günther

Other Decks in Technology

Transcript

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

    IRC is a very old and efficient way to communicate with text.
  2. Saving credentials var opts = { ircServer: "irc.freenode.net", ircChannel: "#padrino",

    ircNick: "padrinobot", ircAdmin: "wikimatze", ircOpts: getIrcOpts(), gitterApiKey: "<you-gitter-apikey>", gitterRoom: "padrino/padrino-framework" }
  3. 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
  4. 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!
  5. 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):
  6. 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
  7. 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