Skip to content

Instantly share code, notes, and snippets.

View CodisRedding's full-sized avatar

Rocky Assad CodisRedding

View GitHub Profile
import superagent from 'superagent';
import config from '../config';
import cookie from 'react-cookie';
const methods = ['get', 'post', 'put', 'patch', 'del'];
function formatUrl(path) {
const adjustedPath = path[0] !== '/' ? '/' + path : path;
if (__SERVER__) {
// Prepend host and port of the API server to the path.
# Use `hub` as our git wrapper:
# http://defunkt.github.com/hub/
hub_path=$(which hub)
if (( $+commands[hub] ))
then
alias git=$hub_path
fi
# The rest of my fun git aliases
alias gpp='git pull --prune'
alias reload!='. ~/.zshrc'
alias c='clear'
alias g='cat ~/.dotfiles/git/aliases.zsh'
alias e='exit'
# shortcut to this dotfiles path is $ZSH
export ZSH=$HOME/.dotfiles
# your project folder that we can `c [tab]` to
export PROJECTS=~/src
# Stash your environment variables in ~/.localrc. This means they'll stay out
# of your main dotfiles repository (which may be public, like this one), but
# you'll have access to them in your scripts.
if [[ -a ~/.localrc ]]
as='colourify as'
c=clear
colourify='/usr/local/bin/grc -es --colour=auto'
configure='colourify ./configure'
df='colourify df'
diff='colourify diff'
dig='colourify dig'
g='cat ~/.dotfiles/git/aliases.zsh'
g++='colourify g++'
gas='colourify gas'
@CodisRedding
CodisRedding / http.agent.nut
Last active August 29, 2015 14:27 — forked from ElectricImpSampleCode/http.agent.nut
This example shows a minimal HTTP Request handler function with the recommended structure.
// Define an HTTP request handler
function requestHandler(request, response) {
try {
if ("setting" in request.query) {
// 'setting' is a URL-encoded parameter, ie. '/setting=4'
local settingValue = request.query.setting;
// Use the 'response' object to acknowledge reception of the request
// to the request's source. '200' is HTTP status code for 'OK'
response.send(200, "Setting received and applied");
1. close all applications
2. close all open workspaces
3. open x number of workspaces (from a .config file)
4. open browser with 3 tabs set (from a .config file)
5. move browser to 1st workspace & maximize window (not fullscreen)
6. open vim in project root (from a .config file or user input)
7. move vim to 2nd workspace & fullscreen
8. open iterm with 3 tabs
9. set 1st tab to current project root
10. set 2nd tab to current project root and run init cmd (from .config file)
@CodisRedding
CodisRedding / playlist.md
Created February 19, 2015 16:08
playlist
@CodisRedding
CodisRedding / .jshintrc
Created January 26, 2015 15:46
jshintrc file for Meteor apps
{
// JSHint Default Configuration File (as on JSHint website)
// Modified for describing Meteor.js convention
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : true, // true: Identifiers must be in camelCase
" Press ? for help
.. (up a dir)
/Users/rocky/vim-settings/.vim/
▸ bundle/
▸ snippets/
▸ spell/