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
class MyClass {
function __construct() { echo "global"; }
}
// 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')
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
@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()
})
@aredridel
aredridel / ifcfg-ppp0
Created October 28, 2011 02:17
PPP configuration for CentOS and PPPoA
# this file goes in /etc/sysconfig/networking/profiles/default
NAME=ppp0
BOOTPROTO=dhcp
TYPE=Modem
AC=off
BSDCOMP=off
VJCCOMP=off
CCP=off
PC=off
VJ=off
@aredridel
aredridel / Diagram.txt
Created September 4, 2011 03:48
Simple request/action/response and template example
Post
+-----+
| |
+-----------+-+ | +------------+
+--------------+ | | +-v------------+ | |
| | | Register | | | | Logged in |
| | | Template | | Do | | Template |
| Register | | | | Register | | |
| | | | | | | |
| | +-------^-----+ | | +--^---------+
aredridel@host ~/working ls testsparse
-rw-r--r-- 1 aredridel users 1000000001 Apr 24 00:27 testsparse
aredridel@host ~/working$ stat testsparse
File: `testsparse'
Size: 1000000001 Blocks: 32 IO Block: 4096 regular file
Device: fd02h/64770d Inode: 2408452 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 500/aredridel) Gid: ( 1000/ users)
Access: 2011-04-24 00:26:56.000000000 -0600
Modify: 2011-04-24 00:27:04.000000000 -0600
@aredridel
aredridel / gist:774092
Created January 11, 2011 06:07
Exception inheritance from jsdom
core.DOMException = function(code, message) {
this._code = code;
Error.call(this, core.exceptionMessages[code]);
this.message = core.exceptionMessages[code];
if(message) this.message = this.message + ": " + message;
if(Error.captureStackTrace) Error.captureStackTrace(this, core.DOMException);
};
core.DOMException.prototype = {
get code() { return this._code;},
@aredridel
aredridel / codePage.patch
Created January 1, 2011 23:12
Fix for code page error
Index: Classes/PHPExcel/Shared/CodePage.php
===================================================================
--- Classes/PHPExcel/Shared/CodePage.php (revision 66289)
+++ Classes/PHPExcel/Shared/CodePage.php (working copy)
@@ -45,6 +45,7 @@
*/
public static function NumberToName($codePage = '1252')
{
+ if($codePage == 0) $codePage = 1252;
switch ($codePage) {