Links and Notes from my Classy Git RubyConf talk:
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
tcp_syslog is now a gem : | |
https://github.com/tech-angels/tcp_syslog |
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
// netj's icon with HTML5 canvas | |
function drawIconOnCanvas(w, opacity, canvas, a) { | |
if (canvas.getContext) { | |
var c = canvas.getContext("2d"); | |
// name some constants | |
canvas.width = canvas.height = w; | |
c.clearRect(0, 0, w, w); | |
var o = w/12; | |
var l = (w-3*o)/2; |
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
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz | |
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz | |
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz | |
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz | |
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz |
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
#!/bin/bash | |
# have to hand install this one sorry http://www.cmake.org/files/v2.8/cmake-2.8.3-Darwin-universal.tar.gz | |
if [ "$1" == "cleanup" ]; then | |
echo "Cleaning up old luajit install" | |
cd /usr/local/share | |
sudo rm -rf lua luajit-2.0.0-beta6 |
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
/* | |
As of version 1.1.2, Propane will load and execute the contents of | |
~Library/Application Support/Propane/unsupported/caveatPatchor.js | |
immediately following the execution of its own enhancer.js file. | |
You can use this mechanism to add your own customizations to Campfire | |
in Propane. | |
Below you'll find two customization examples. |
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
$ ./run.rb --rubies=/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/bin/macruby,/Library/Frameworks/MacRuby.framework/Versions/0.11/usr/bin/macruby | |
Name MacRuby 0.10 MacRuby 0.11 | |
------------------------------------------------------------ | |
array:<< 0.561269 0.576191 | |
array:new 1.911732 2.083757 | |
array:[] 0.135262 0.134868 | |
array:[]= 0.328496 0.329456 | |
eval:lit 0.741252 0.745280 | |
hash:new 4.637268 4.605469 | |
hash:[] 0.565377 0.550961 |
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
MyApp.Selection = SC.Object.extend({ | |
name: null, | |
isSelected: false | |
}); | |
MyApp.content = [ | |
MyApp.Selection.create({ name: "Male" }), | |
MyApp.Selection.create({ name: "Female" }) | |
] |
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
/** | |
NOTE: The template in this example relies on itemView, which is not yet | |
in SproutCore 2.0 master, but is coming | |
*/ | |
MyApp.Selection = SC.Object.extend({ | |
name: null, | |
isSelected: 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
framework 'Cocoa' | |
framework 'QuartzCore' | |
class NSColor | |
def toCGColor | |
colorRGB = self.colorUsingColorSpaceName NSCalibratedRGBColorSpace | |
components = Array.new(4){Pointer.new(:double)} | |
colorRGB.getRed components[0], green:components[1], blue:components[2], alpha:components[3] |
OlderNewer