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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>DailyJS Boomerang Example</title> | |
</head> | |
<body> | |
<h1>Boomerang Test</h1> | |
<div id="results"> | |
</div> |
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
" vim:fdm=marker | |
" Editor basics {{{ | |
" Behave like Vim instead of Vi | |
set nocompatible | |
" Show a status line | |
set laststatus=2 | |
" Show the current cursor position |
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
// JsChat client code using Rhino | |
// rlwrap java -jar js.jar | |
// load('jschat-client-rhino.js'); | |
var JsChat = {}; | |
JsChat.Connection = function(server_address, port) { | |
importPackage(java.io); | |
importPackage(java.net); |
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 | |
SESSION=tlol | |
tmux set -g default-shell /bin/bash | |
tmux set -g default-command /bin/bash | |
tmux new-session -d -s $SESSION | |
tmux send-keys "/usr/local/bin/sl" C-m C-d |
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
#!/usr/bin/env sh | |
ioreg -l | grep -i capacity | tr '\n' ' | ' | awk '{printf("%.2f%%\n", $10/$5 * 100)}' |
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
gapi = {}; | |
gapi.client = { | |
load: function(path, version, cb) { | |
cb(); | |
}, | |
oauth2: { | |
userinfo: { | |
get: function() { | |
return { | |
execute: function(cb) { |
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
#!/usr/bin/env bash | |
tput civis | |
tput setab 255 | |
tput clear | |
./vpad.sh 7 | |
tput setaf 35 | |
figlet -w `tput cols` -c -f roman "UNIX" | |
./center.sh "LIVE FREE OR DIE" | |
read -s | |
tput sgr0 |
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
Ext.ux.SchemaGrid = Ext.extend(Ext.grid.GridPanel, { | |
initComponent: function() { | |
var me = this, | |
schema = me.initialConfig.schema, | |
fields = schema.fields, | |
id = Ext.id(); | |
var store = new Ext.data.JsonStore({ | |
root: 'list', |
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
my-project/ | |
Makefile (run tests) | |
index.js (require app.js and start it listening on a port) | |
package.json (include dependencies and devDependencies, package.json isn't just for publishing to npm) | |
lib/ | |
app.js (Set up your Express app, assuming it's Express of course. You could do var User = require('models').User) | |
controllers/ | |
users.js | |
models/ | |
index.js (do exports.User = require('./user'); for each model) |
NewerOlder