Skip to content

Instantly share code, notes, and snippets.

View dustinc's full-sized avatar

Dustin Coffey dustinc

  • Ellijay, GA
  • 02:38 (UTC -04:00)
View GitHub Profile

@kyleeddins2 @chadsaxon

New endpoints:

  • /post/requests/pending - List ALL pending booking requests. To only send back booking requests I added a post field to the booking request object to help format approval url.
  • /post/:id/requests/pending - List pending booking requests for post of :id.
  • /post/:id/requests/:request_id/approve - Approve a booking request.
  • /settings[/:id] - CRUD operation on Settings resource. Format:
{
// from
promisestuff()
.then(result => res.json(result))
// to
promisestuff()
.then((result) => {
// do more stuff then return
return res.json(result);
-----> Installing dependencies
> phantomjs@1.9.12 install /tmp/build_c95f186ac931435b0c8661897f8e3e6d/node_modules/html-pdf/node_modules/phantomjs
> node install.js
Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Receiving...
Error making request.
// 1
renderMethod: function() {
var self = this;
if(this.render_method) return this.render_method;
_(this.get('files').each(function(file) {
if(file.active) {
self.render_method = file.form_render || 'Mapped';
}
});
return this.render_method;
function hello(){
echo 'hello world!';
}
Flight::route('/', 'hello');
@dustinc
dustinc / homemade_earthbox.md
Last active August 29, 2015 14:01
Homemade Earthbox

Homemade Earthbox

Tools

  • Power drill
  • 1/2" and 3/4" drill bits (I used a 3/4" unibit just because I have one)
  • Something to cut large PVC pipe (I used a hacksaw)
  • Strong scissors or snips for cutting plastic
  • Tape measure
  • Marker
git checkout -p -- path/to/file
[core]
autocrlf = input
[color]
ui = auto
diff = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
git stash save "dirty work" (if you have uncommitted changes)
git pull origin (leave master up to date and this also pulls in the develop branch for you)
git push origin master (if you have committed changes you need to clear up first)
git checkout develop (switch to develop branch)
git branch --set-upstream develop remotes/origin/develop (this will set tracking)
git stash pop stash@{0} (Apply any stashed dirty work to develop -- please hit up the stash man page, there's a couple little things that are tricky to explain)
var arr = [1,2,3,4,5];
for(a in arr) {
console.log(a);
}
// keys
// 0,1,2,3,4
arr.forEach(function(a) {
console.log(a);