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
# Customize prompt | |
[[ -s ~/.bashrc ]] && source ~/.bashrc | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
alias ls='ls -GFh' | |
alias ll='ls -l' | |
function prompt { |
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
// install node dependencies with `npm install chalk firebase json2csv le-storage-service le-storage-provider-firebase` before running | |
var FIREBASE_URL = 'FIREBASE URL GOES HERE'; | |
var FIREBASE_SECRET = 'FIREBASE SECRET GOES HERE'; | |
var fs = require('fs'); | |
var chalk = require('chalk') | |
var Firebase = require('firebase'); | |
var json2csv = require('json2csv'); | |
var StorageProvider = require('le-storage-provider-firebase'); |
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
firebaseRef.child('properties').orderByChild('owner_id').equalTo(1).on('child_added', function (data) { | |
console.log(data); | |
}, function (err) { | |
console.log(err); | |
}); |
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
var request = require('request'); | |
var customer = // customer id | |
var id = // bank account id | |
var secretKey = // your stripe secret key | |
var amounts = [32, 45]; | |
var url = 'https://api.stripe.com/v1/customers/' + customer + '/bank_accounts/' + id + '/verify'; | |
var options = { | |
url: url, | |
auth: { 'bearer': secretKey }, |
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
var today = new Date(); new Firebase('https://castle-development.firebaseio.com/tenants/[propertyId]/[tenantId]/rent/payments').push({ amount: [amount], createdBy: 'admin', dueDate: new Date(today.getFullYear(), today.getMonth(), 1).getTime(), createdAt: today.getTime() }); |
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
{ | |
"author": "Alessandro Arnodo", | |
"name": "angular-kickstart", | |
"email": "alessandro@arnodo.net", | |
"url": "http://alessandro.arnodo.net", | |
"version": "1.0.4", | |
"homepage": "https://github.com/vesparny/angular-kickstart", | |
"description": "Speed up your AngularJS development whith a great build system.", | |
"license": "MIT", | |
"bugs": "https://github.com/vesparny/angular-kickstart/issues", |
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
var Firebase = require('firebase'); | |
var EmailService = require('./services/email'); | |
var ref = new Firebase(process.env.FIREBASE_URL); | |
var firstLoad = true; | |
ref.authWithCustomToken(process.env.FIREBASE_SECRET, function (err) { | |
if (firstLoad) { | |
firstLoad = false; | |
// When a potential tenant submits an application, email out an alert |
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
# setup seamless navigation between tmux & vim | |
bind -n C-h run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L" | |
bind -n C-j run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D" | |
bind -n C-k run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U" | |
bind -n C-l run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R" | |
# remap prefix from ctrl-b to ctrl-a | |
set -g prefix C-a | |
# remap hotkeys for splitting panes |
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
//in the IssuesController | |
if (Input::hasFile('displayPicture')) | |
{ | |
//process file input | |
//TODO: Validate that this is an image | |
$newName = Uploader::processInputFilename(Input::file('displayPicture')->getClientOriginalName()); | |
try{ | |
Input::file('displayPicture')->move(public_path() . Config::get('upload.directory'), $newName); | |
} catch (FileException $e) { | |
return Redirect::back()->with('flash_error', "Your file could not be uploaded. Please try again")->withInput(); |
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
save() |