Skip to content

Instantly share code, notes, and snippets.

View aredridel's full-sized avatar
💭
See my social media for status.

Aria Stewart aredridel

💭
See my social media for status.
View GitHub Profile
@aredridel
aredridel / action.js
Created November 6, 2011 22:34
jsviews demo
var image = {thumbnail: "/path/to/thumbnail", caption: "My really awesome image"}
$('thingtoactivateon').click(function() {
$($('#photoDetailsEdit').render(image)).dialog()
})
Rubinius Crash Report #rbxcrashreport
Error: signal SIGSEGV
[[Backtrace]]
0 rake 0x0000000100054a50 _ZN8rubiniusL12segv_handlerEi + 160
1 libsystem_c.dylib 0x00007fff90242cfa _sigtramp + 26
2 rake 0x00000001001f86ba _ZN8rubinius11CodeManager12add_resourceEPNS_12CodeResourceE + 74
3 rake 0x000000010005defb _ZN8rubinius11InlineCache11empty_cacheEPNS_2VMEPS0_PNS_9CallFrameERNS_9ArgumentsE + 91
4 rake 0x0000000100068597 _ZN8rubinius8VMMethod11interpreterEPNS_2VMEPS0_PNS_20InterpreterCallFrameE + 5447
// This example adapted from Matt Gallagher's "Minimalist Cocoa Programming"
// blog article:
// http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html
var $ = require('NodObjC')
$.import('Cocoa')
$.import('WebKit')
var pool = $.NSAutoreleasePool('alloc')('init')
, app = $.NSApplication('sharedApplication')
// This example adapted from Matt Gallagher's "Minimalist Cocoa Programming"
// blog article:
// http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html
var $ = require('NodObjC')
$.import('Cocoa')
$.import('WebKit')
var pool = $.NSAutoreleasePool('alloc')('init')
, app = $.NSApplication('sharedApplication')
@aredridel
aredridel / flip.js
Created September 29, 2012 16:10
Flip a web page upside down
$('head').append("<style>body { -webkit-transform: rotate(180deg) translate(0, -" + ($(document).height() - $(window).height()) + "px) }</style>");
class MyClass {
function __construct() { echo "global"; }
}
@aredridel
aredridel / config.json
Created October 21, 2012 15:20
Example of configuration injection in node.js
{
"value": "config value here"
}
var repl = require('repl')
, rl;
rl = repl.start({
prompt: '>>> '
, input: process.stdin
, output: process.stdout
});
rl.on('close', function () {
@aredridel
aredridel / vagrant.org
Created November 9, 2012 17:23 — forked from akiatoji/vagrant.org
CentOS 6.2 Box for Vagrant

Installing CentOS

Download net install iso:

  • CentOS-6.2-x86_64-netinstall.iso

Create a new VirtualBox machine

  • Name: vagrant-centos
  • Operating System: Linux
@aredridel
aredridel / logsubprocess.sh
Created November 15, 2012 05:41
Execute a logger as a subprocess and exec, leaving only the two child processes without using bash 4.0
#!/bin/bash
tmp=/tmp/$$.pipe
mkfifo $tmp
logger -p local6.debug < $tmp &
exec > $tmp