Skip to content

Instantly share code, notes, and snippets.

View andrewstucki's full-sized avatar
🐙
💻 😬

Andrew Stucki andrewstucki

🐙
💻 😬
View GitHub Profile
// +build windows
package util
// Copyright (c) Yasuhiro MATSUMOTO <[email protected]>
//
// MIT License (Expat)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
@andrewstucki
andrewstucki / gist:b3242e6a5a4520cabfa1a15ff857ca3f
Created November 11, 2017 03:31
Compile Proxygen on Mac OS X
# homebrew dependencies
brew install folly autoconf-archive wget boost
# wangle
curl -L https://github.com/facebook/wangle/archive/v2017.11.06.00.tar.gz | tar xvzf -
mkdir wangle-2017.11.06.00/wangle/Release && cd wangle-2017.11.06.00/wangle/Release
cmake -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl ..
make -j 8
make install
#!/usr/bin/env ruby
class ChordParser
CHROMATICS = ['A', ['A#','Bb'], 'B', 'C', ['C#','Db'], 'D', ['D#','Eb'], 'E', 'F', ['F#','Gb'], 'G', ['G#','Ab']].freeze
MAJOR_STEPS = [0, 2, 2, 1, 2, 2, 2].freeze
MAJOR_SCALES = (0..11).map do |offset|
accumulator = 0
scale = []
MAJOR_STEPS.each_with_index do |increment, index|
accumulator += increment
irb(main):001:0> require 'active_record'
=> true
irb(main):002:0> class Test < ActiveRecord::Base
irb(main):003:1> self.abstract_class = true
irb(main):004:1> end
=> true
irb(main):005:0> class SubClass < Test
irb(main):006:1> end
=> nil
irb(main):007:0> SubClass.table_name