Skip to content

Instantly share code, notes, and snippets.

/server add <name> <team>.irc.slack.com/6667 -ssl -password=<password>
/set irc.server.<name>.ssl_verify off
/set irc.server.<name>.nicks <username>
/connect <name>
@AndrewVos
AndrewVos / index.html
Last active December 20, 2015 14:09 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
</style>
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
def remove_all_methods(definition)
lines = definition.lines.to_a
while idx = lines.find_index { |line, index| method_definition?(line) }
method_length = Pry::Code.new(lines).expression_at(idx + 1).lines.count
lines.slice!(idx, method_length)
end
lines.join
end
@AndrewVos
AndrewVos / TextAnalyzer-Ref
Created September 19, 2011 22:27 — forked from stuckinthecloud/gist:1227555
Refractored TextAnalyzer
#!/usr/bin/ruby
# Text Analyzer
# Author: Zach
# Purpose: Utilize Ruby to analyze Text files
# and generate statistical information therein.
require 'cgi'
STOPWORDS = File.read('conf/stop_words.txt').map{|x| x.chomp}
@AndrewVos
AndrewVos / example.rb
Created September 12, 2011 18:31 — forked from Phrogz/example.rb
example
class WordReader
def initialize file
@file = file
end
def read_words
File.read(@filename).split(/\s+/)
end
end
class CommonWordRemover