Auth and copy token at https://irc.gitter.im/.
Ignore the /PASS thing, it doesn't work in weechat.
/server add gitter irc.gitter.im -ssl -ssl_verify -ssl_dhkey_size=1024 -password=<REPLACE_WITH_YOUR_TOKEN>
/connect gitter
| find /var/folders -name com.apple.dock.iconcache -exec rm {} \; 2>/dev/null; killall Dock |
| #!/usr/bin/env ruby | |
| # [sudo] gem install rmagick | |
| require 'rmagick' | |
| def prepend_ext(path, with) | |
| with_ext = File.basename path | |
| ext = File.extname path | |
| no_ext = File.basename path, ext | |
| path.sub with_ext, "#{no_ext}#{with}#{ext}" |
| #!/bin/bash | |
| # this is for setting up a session in tmux | |
| tmux set default-path $(pwd) | |
| tmux rename-session $(basename $(pwd)) |
| /Users/rainevi/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:918:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError) | |
| from /Users/rainevi/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:918:in `block in connect' | |
| from /Users/rainevi/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/timeout.rb:52:in `timeout' | |
| from /Users/rainevi/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:918:in `connect' | |
| from /Users/rainevi/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:862:in `do_start' | |
| from /Users/rainevi/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:851:in `start' | |
| from /Users/rainevi/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:582:in `start' | |
| from /Users/rainevi/.rvm/gems/ruby-2.0.0-p451/gems/soundcloud2000-0.1.0/lib/soundcloud2000/client.rb:33:in `request' | |
| from /Users/rainevi/.rvm/gems/ruby-2.0.0-p451/gems/soundcloud2000-0.1.0/lib/soundcloud2000/client.rb:39:in `get' | |
| from /Users/rainevi/ |
| for src in "$@"; do | |
| dst="Screenshots/$(basename "$src")" | |
| ~/dropbox_uploader.sh upload "$src" "$dst" | |
| echo $(~/dropbox_uploader.sh share "$dst") | egrep -o 'https?://[^ ]+' | tr -d '\n' | pbcopy | |
| say -v Satu "sun urlis on clipboordilla" | |
| done |
| var Promise = require('bluebird'); | |
| var _ = require('lodash'); | |
| Promise.all([ | |
| findPhoto().then(maybe(photo2data)), | |
| findCard().then(maybe(card2data)) | |
| ]) | |
| .then(_.compact) | |
| .spread(function(data) { | |
| alert(JSON.stringify(data, null, 4)); |
| module TitleCase (titleCase) where | |
| import Data.Char | |
| import Debug.Trace | |
| titleCase :: String -> String -> String | |
| titleCase minor title = "a" | |
| capitalize :: String -> String | |
| capitalize (x:xs) = toUpper x : xs |
| module Cycle where | |
| import Data.List (elemIndex) | |
| import Data.Functor ((<$>)) | |
| data Direction = L | R deriving (Show) | |
| cycleList :: (Eq a) => Direction -> [a] -> a -> Maybe a | |
| cycleList _ [] x = Nothing | |
| cycleList L xs x = ((rotate R xs) !!) <$> elemIndex x xs |
Auth and copy token at https://irc.gitter.im/.
Ignore the /PASS thing, it doesn't work in weechat.
/server add gitter irc.gitter.im -ssl -ssl_verify -ssl_dhkey_size=1024 -password=<REPLACE_WITH_YOUR_TOKEN>
/connect gitter
| var fs = require('fs'); | |
| var { compose, map, apply, toPairs } = require('ramda'); | |
| var examples = JSON.parse(fs.readFileSync(__dirname + '/../examples/examples.json', 'utf8')); | |
| var argsToObj = function(filename, script) { | |
| return { filename, script }; | |
| }; | |
| var mapObjToArray = compose(map(apply(argsToObj)), toPairs); |