Skip to content

Instantly share code, notes, and snippets.

Avatar
🌮
not in the face

Aaron Stacy aaronj1335

🌮
not in the face
View GitHub Profile
@aaronj1335
aaronj1335 / README.md
Created May 11, 2012
relative paths in AMD
View README.md

Given a project with the files below and a directory structure as follows:

$ tree --charset ascii
.
|-- index.html
|-- js
|   |-- components
|   |   `-- vendor
|   |       |-- jquery-1.7.2.js
|   |       |-- jquery.js
View commands.sh
[me@laptop:code/] $ cd A
[me@laptop:code/A] $ npm link # this works as i expect (and want)
[me@laptop:code/A] $ ll /usr/local/lib/node_modules
...
lrwxr-xr-x 1 me admin 22 May 18 16:59 /usr/local/lib/node_modules/A -> /Users/me/code/A
...
[me@laptop:code/A] $ cd ../B
[me@laptop:code/B] $ cat package.json
...
"dependencies": {
@aaronj1335
aaronj1335 / ip
Created Jun 22, 2012
cmd line ip checker
View ip
#!/bin/bash
# handy script to check your laptop's ip
if ! which ip &>/dev/null; then
function ip {
local addr='\d{1,3}(\.\d{1,3}){3}'
# if the argumetn was '-' echo the external ip
if [ "$1" = '-' ]; then
@aaronj1335
aaronj1335 / run_in_mingw.sh
Created Jun 27, 2012
improper handling of command line arguments in node 0.8.0
View run_in_mingw.sh
echo 'console.log(process.argv);' > test.js
node test.js /static
# prints out ['C\\:Program Files\\nodejs\\node.exe', 'C:\\Users\\astacy\\code\\daft\\test.js', 'C:/Program Files/Git/static']
@aaronj1335
aaronj1335 / index.html
Created Jul 19, 2012
A web page created at CodePen.io
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CodePen &middot; Pen</title>
<!--
Copyright (c) 2012 Mahroof Ali, http://codepen.io/anon
Permission is hereby granted, free of charge, to any person obtaining
View noderepl
#!/usr/bin/env node
var repl = require('repl'),
fs = require('fs'),
path = require('path'),
vm = require('vm');
var myrepl = repl.start('> ');
var stup = path.join(process.env.HOME, '.noderc');
@aaronj1335
aaronj1335 / maximize_without_resizing_quickfix.vim
Created Aug 13, 2012
vimscript that maximizes the current window without resizing the quickfix window
View maximize_without_resizing_quickfix.vim
" this just sets the current window to the specified number
"
" i think this is what really slows things down
function SetCurWinNr(tot, nr)
exe a:tot . ' winc k'
if a:nr > 1
exe (a:nr-1) . ' winc j'
endif
endfunction
@aaronj1335
aaronj1335 / README.md
Created Aug 22, 2012
bootstrapping mr
We couldn’t find that file to show.
@aaronj1335
aaronj1335 / test.js
Created Oct 23, 2012
optionally returning a deferred
View test.js
something.then(function() {
if (config.somethingElse) {
return somethingElse();
}
});
@aaronj1335
aaronj1335 / discussion.md
Created Oct 24, 2012
gloss framework stuff
View discussion.md

powergrid

todos

  • make Column.prototype.columnClass correctly handle names containing '.'

  • column methods for getting/formatting a table cell's value (see below)

  • add an Grid.prototype._isFiltered method that is used to determine whether the grid adds a filtered class. default behavior should be something like:

     _isFiltered: function() {
    
You can’t perform that action at this time.