Skip to content

Instantly share code, notes, and snippets.

View BrunoAssis's full-sized avatar

Bruno Assis BrunoAssis

View GitHub Profile
from flask import Flask, request, jsonify
from myapp import db
app = Flask(__name__)
@app.route('/user', methods=['POST'])
def create():
data = request.json
username = data.get('username')

Scaffold for a browser app build with Ember.js, Rails, Ember.Data

Journal App

This is a scaffold for setting up: an API with Rails and the ember-rails gem, persistence with Ember.Data, and a browser app using Ember.js

See source code on GitHub: pixelhandler/journal.

@BrunoAssis
BrunoAssis / Músicas
Created April 10, 2014 20:10
Músicas do Karaoke
<table border="1">
<thead><tr><th title="Field #1">#</th>
<th title="Field #2">Artista</th>
<th title="Field #3">Música</th>
<th title="Field #4">Duração</th>
</tr></thead>
<tbody><tr><td align="right">537</td>
<td>4 Non Blondes</td>
<td>What&#39;s Up</td>
<td>4:31</td>
export PATH="/Applications/Postgres.app/Contents/Versions/9.3/bin:$PATH"
export PATH=/usr/local/bin:$PATH
export PATH=/Users/davidhill/.rvm/gems/ruby-2.0.0-p451/bin:$PATH
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
@BrunoAssis
BrunoAssis / gist:5558544
Created May 11, 2013 01:28
Excel macro example in PHP.
<?php
// set up excel
$excel = new COM("excel.application") or die("Unable to instantiate excel");
// run Excel silently, since we don’t want dialog boxes popping up in the background
$excel->DisplayAlerts = false;
// open up Excel file and select the first sheet, which contains the inputs
$excel->Workbooks->Add();
$book = $excel->ActiveWorkbook;
$sheets = $book->Sheets;
$sheet = $book->Worksheets(1);
@BrunoAssis
BrunoAssis / Fire.lua
Created January 21, 2013 19:12 — forked from juaxix/Fire.lua
Fire = class()
-- Towers versus Zombies by @juaxix
-- LGPL - 11/2011 
-- http://videojuegos.ser3d.es
-- it is a pleasure to gift this to the world 
-- thanks from heart to all the 2lifesleft team
function Fire:init(attackpower,position,model)
    self.attackpower = attackpower
    self.position    = position
    self.parent      = model