Skip to content

Instantly share code, notes, and snippets.

View samdelagarza's full-sized avatar

Sam De La Garza samdelagarza

View GitHub Profile
[
{
"userId": "abc123",
"dashboard": {
"id": "8a568ff1-g1f2-123d-999d-9594535699ca",
"name": "my favorites",
"slug": "my-favorites",
"description": "some",
"layoutId": 123,
"isDefault": true,
{
Carina.feature.ADMIN: {
CanRoute: true
},
Carina.feature.PROFESSIONALSERVICES: {
CanLoad: false,
CanShowCreateButton: false
}
}
return Ember.RSVP.all([
this.store.find('employee'),
this.store.find('trailer', params.trailerId)
]).then(function (values) {
return {
trailer: values[0],
employees: values[1]
};
});
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
Stack trace:
Error: ENOTDIR, mkdir '/var/folders/35/qn94gb3d7xz6bygd0l7_0c0hcpyn4j/T/[username]/bower'
#!/bin/bash
# Sample App Init script for running sample app daemon
#
# chkconfig: - 98 02
#
# description: Sample Application Upstart, using Forever
APPHOME=/opt/sample-app
APPSCRIPT=app.js
#!/bin/bash
echo "Finding latest version."
VERSION=`curl -s http://nodejs.org/dist/latest/SHASUMS.txt | awk '/node-v/ {print $2}' | head -1 | sed s/node-v// | sed s/-/\ / | awk '{print $1}'`
echo "Preparing to install node-v$VERSION"
url="http://nodejs.org/dist/v"$VERSION"/node-v"$VERSION".tar.gz"
echo "GET" $url
curl $url | tar -zxf -
alias gtfc="git tf checkin --deep --associate "
alias gtfp="git tf pull --rebase --deep "
alias gs="git status"
alias gc="git commit -am "
alias c="clear"
alias glc="grunt lint:client"
alias k="killall node"
alias ws="/usr/local/bin/wstorm"
@samdelagarza
samdelagarza / gist:5761308
Created June 11, 2013 22:26
Simple oData builder
define(['underscore', 'moment'], function (_, moment) {
var Url = function (uriString) {
var queryHash = {},
url = uriString,
buildQueryParameter = function (name, value) {
// http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type -- application/x-www-form-urlencoded
// don't append "=" for null values, according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#url-parameter-serialization
return encodeURI(name) + (value !== null ? "=" + encodeURI(value) : "");
};
var fs = require("fs");
/**
* Call fileHandler with the file name and file Stat for each file found inside
* of the provided directory.
*
* Call the optionally provided completeHandler with an array of files (mingled
* with directories) and an array of Stat objects (one for each of the found
* files.
*