This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rest-client' | |
require 'json' | |
require 'time' | |
require 'date' | |
at = ENV['access_token'] | |
if at.nil? | |
$stderr.write 'go get an access token at https://developers.facebook.com/tools/explorer/ with permissions to read your birthday, feed and post on your behalf' | |
exit 1 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'csv' | |
require 'rest-client' | |
require 'json' | |
CSV.foreach("./tv_shows.csv") do |row| | |
begin | |
name = row[1] | |
row[1].gsub!(/ /, "+") | |
puts("https://graph.facebook.com/search?until=yesterday&q=#{row[1]}&type=page") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'csv' | |
require 'json' | |
require 'oauth' | |
class Credentials | |
def self.next | |
@@read_creds ||= CSV.foreach("./creds.csv") do |row| | |
@@vals ||= [] | |
@@vals << {:consumer_key => row[0], :consumer_secret => row[1], :token => row[2], :secret => row[3]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From http://alexyoung.org/2011/12/19/build-an-ide-with-tmux-and-vim/ | |
set-window-option -g mode-keys vi | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
bind-key -rn C-h select-window -t :- | |
bind-key -rn C-l select-window -t :+ | |
set -g default-terminal "screen-256color" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'redis' | |
get_and_rem_script = <<EOF | |
local resp = redis.call('zrangebyscore', KEYS[1], '-inf', '+inf', 'LIMIT', '0', '1'); | |
if (resp[1] ~= nil) then | |
local val = resp[# resp] | |
redis.call('zrem', KEYS[1], val) | |
return val | |
else | |
return false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDs/OqkjP+BkZAqppcifbiK93yFd4QznkbY7NVVrt4VaQFwn24X66I0h5k1b+e4TPBA5KHP1iZPMYlX22TCg/zu2H7ldoEANbQO2HgOnQttkYg0y3y14FEQ3i2URohASaMsKV6+SMse3Eg8RN6Am2V8xQbZDxE3XFbddamCWfcLDEeMnf7sVhmSB5d1p1X/KioeZJTbP8bq/F2UXscbXybQBLwv6jjptgfiKmuHAvzVIV8vjk3AClOKkweFb/AONNqfQQZkRXUvaqbgjo3US1VYiBApz3JbQk6rlbOlwRWmQVJegRZmegng+qyD8/+nK2dLzKiYsG2UgLnbG60orGfZ [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict" | |
var m = require("monet"); | |
var MonadT = m.MonadT; | |
var IO = m.IO; | |
var Observable = require("rx").Observable; | |
class IOObs { | |
constructor(ioObservable){ | |
this.value = ioObservable; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict" | |
var R = require("ramda"); | |
var Sequelize = require("sequelize"); | |
var Either = require("fantasy-eithers"); | |
var Left = Either.Left | |
var Right = Either.Right | |
var Observable = require("rx").Observable; | |
var rx = require("rx"); | |
var EitherHelpers = require("fantasy-contrib-either") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nohud | |
set smoothscroll | |
"set noautofocus " The opposite of autofocus; this setting stops | |
" sites from focusing on an input box when they load | |
set typelinkhints | |
set dimhintcharacters | |
let scrollstep = 70 | |
let zoomfactor = 0.1 | |
let scrollduration = 350 | |
let searchlimit = 500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flow = do | |
_ <- splashScreen | |
l <- languageSet | |
pure(l ? npciSplashScreen : ChooseLanguageScreen) | |
npciSplashScreen = do | |
_ <- wait 0 | |
permission <- checkPermission | |
pure(permission ? postPermission : showPermission) |
OlderNewer