Skip to content

Instantly share code, notes, and snippets.

View juanpujol's full-sized avatar
🇧🇷
Always Working Remotely

Juan Pujol juanpujol

🇧🇷
Always Working Remotely
View GitHub Profile
$(document).ready(function() {
$('table.tracks tbody').makeSortable({ url: "<%= sort_my_mix_tracks_path(mix) -%>" });
});
web: node server
class Api::RegistrationsController < Api::BaseController
respond_to :json
def create
user = User.new(params[:user])
if user.save
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201
return
else
protractor.wrapDriver
protractor.setInstance
protractor.getInstance
protractor.By
protractor.By.binding
protractor.By.select
protractor.By.selectedOption
protractor.By.input
protractor.By.repeater
@juanpujol
juanpujol / megaNumber.js
Created November 7, 2015 12:17 — forked from timgit/megaNumber.js
Large number format filter for Angular written in ES6 that rounds to the specified decimal place (defaults to 1). 1 billion => 1B, 1,490,000 => 1.5M, 999,999 => 1M
angular.module('utilsModule').filter("megaNumber", () => {
return (number, fractionSize) => {
if(number === null) return null;
if(number === 0) return "0";
if(!fractionSize || fractionSize < 0)
fractionSize = 1;
var abs = Math.abs(number);