Skip to content

Instantly share code, notes, and snippets.

View tysone's full-sized avatar

Tyson Evans tysone

View GitHub Profile
@robinsloan
robinsloan / pcal.rb
Created March 11, 2015 17:42
Add entries for prime-numbered weekdays to your Google calendar. Useful to literally no one but me.
require "rubygems"
require "google_calendar"
require "date"
require "prime"
# Create an instance of the calendar.
cal = Google::Calendar.new(:client_id => "foo"
:client_secret => "bar",
:calendar => "blee",
@ftrain
ftrain / rhymes.clj
Last active July 14, 2023 22:20
Annotated rhyming dictionary
;; This is at: https://gist.github.com/8655399
;; So we want a rhyming dictionary in Clojure. Jack Rusher put up
;; this code here:
;;
;; https://gist.github.com/jackrusher/8640437
;;
;; I'm going to study this code and learn as I go.
;;
;; First I put it in a namespace.
# MAC manipulators
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`'
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE'
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
var stateToAP = function(state) {
var STATES = [
["Alabama", "AL", "Ala.", 1],
['Alaska', "AK", "Alaska", 2],
["Arizona", "AZ", "Ariz.", 4],
["Arkansas", 'AR', "Ark.", 5],
["California", "CA", "Calif.", 6],
["Colorado", "CO", "Colo.", 8],
["Connecticut", "CT", "Conn.", 9],
["Delaware", "DE", "Del.", "10"],