This file contains hidden or 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
| ".editorconfig | |
| root = true | |
| bundle/vim-jsbeautify/plugin/lib/beautify.js | |
| [**.js] | |
| ; Path to the external file format | |
| ; The default is taken from the lib folder inside the folder extension. | |
| path=~/.vim/bundle/vim-jsbeautify/plugin/lib/beautify.js | |
| ; Javascript interpreter to be invoked by default 'node' | |
| bin=node |
This file contains hidden or 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
| # from: https://github.com/hashrocket/dotmatrix/blob/master/.hashrc | |
| alias ll='ls -l' | |
| # git_prompt_info accepts 0 or 1 arguments (i.e., format string) | |
| # returns text to add to bash PS1 prompt (includes branch name) | |
| git_prompt_info () { | |
| local g="$(git rev-parse --git-dir 2>/dev/null)" | |
| if [ -n "$g" ]; then | |
| local r | |
| local b |
This file contains hidden or 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
| var _scripts = [ | |
| '/vendor/javascripts/jquery.js', | |
| '/vendor/javascripts/moment.js', | |
| '/vendor/javascripts/mixpanel.js', | |
| '/javascripts/main.js' | |
| ]; | |
| (function (scripts) { | |
| 'use strict'; | |
| function downloadJSAtOnload() { |
This file contains hidden or 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
| var http = require('http'), | |
| fs = require('fs'); | |
| http.createServer(function (req, res) { | |
| var user = 'paulfryzel'; | |
| var path = '/Users/' + user + '/Desktop/newapp/'; | |
| if (req.url === '/css/img/BG.png') { | |
| fs.readFile(path + 'css/img/BG.png', function (error, content) { | |
| if (error) { | |
| res.writeHead(500); |
This file contains hidden or 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
| var Q = require('q'); | |
| function hello() { | |
| var d = Q.defer(); | |
| setTimeout(function() { | |
| d.resolve('hello'); | |
| }, 1000); | |
| return d.promise; | |
| } |
This file contains hidden or 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
| let g:ctrlp_map = '<c-p>' | |
| let g:ctrlp_cmd = 'CtrlP' | |
| let g:ctrlp_custom_ignore = { | |
| \ 'dir': '\v[\/]\.(git|hg|svn)$|node_modules', | |
| \ 'file': '\v\.(exe|so|dll|DS_Store)$', | |
| \ } |
This file contains hidden or 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
| var connect = require("connect"), | |
| director = require("director"), | |
| union = require("union"); | |
| var router = new director.http.Router(); | |
| router.get('/', function () { | |
| this.res.writeHead(200, { 'Content-Type': 'text/plain' }) | |
| this.res.end('Hello, World!\n'); | |
| }); |
This file contains hidden or 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
| [1] pry(main)> class Foo; end | |
| => nil | |
| [2] pry(main)> Foo.foo | |
| NoMethodError: undefined method `foo' for Foo:Class | |
| from (pry):3:in `<main>' | |
| [3] pry(main)> class Foo; def self.foo; puts "foo"; end; end | |
| => nil | |
| [4] pry(main)> Foo.foo | |
| foo | |
| => nil |
This file contains hidden or 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 | |
| # mostly from http://word.bitly.com/post/31921713978/static-analysis | |
| function cfmt { | |
| if [[ $# -ne 1 ]]; then | |
| echo "Usage: cfmt <file>" | |
| else | |
| astyle \ | |
| --style=1tbs \ | |
| --lineend=linux \ | |
| --convert-tabs \ |
This file contains hidden or 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
| function genode() { | |
| if [[ $# -eq 0 ]]; then | |
| echo "Usage: genode <project>" | |
| else | |
| proj=$1; file=${proj//-/_} | |
| mkdir -p $proj/lib && touch $proj/lib/$file.js | |
| echo -e "{\n \"name\": \"$proj\",\n \"version\": \"0.0.1\"\n}" > $proj/package.json | |
| echo -e "module.exports = require('./lib/$file');" > $proj/index.js | |
| echo $proj > $proj/README.md | |
| fi |