Skip to content

Instantly share code, notes, and snippets.

View lucasdinonolte's full-sized avatar
:shipit:

Lucas Dino Nolte lucasdinonolte

:shipit:
View GitHub Profile
@lucasdinonolte
lucasdinonolte / Cakefile
Created November 11, 2012 20:25
Default Cakefile
exec = require('child_process').exec
config =
sassDir : "scss" # SCSS/SASS Folder
cssDir : "css" # CSS Folder
coffeeDir : "src" # CoffeeScript Folder
jsDir : "js" # JavaScript Folder
task "watch", "Watches Assets for changes and compiles them", ->
exec "sass --watch #{config.sassDir}:#{config.cssDir}", (err, stdout, stderr) ->
@lucasdinonolte
lucasdinonolte / gist:4016361
Created November 5, 2012 09:45
Copy current git branch to clipboard
git branch | grep "*" | awk '{ print $2 }' | pbcopy
@lucasdinonolte
lucasdinonolte / binarytree.coffee
Last active March 2, 2018 19:10
Data Structures in CoffeeScript – a growing collection
class Node
cargo : null
left : null
right : null
constructor : (@cargo) ->
class Tree
@lucasdinonolte
lucasdinonolte / modeldecorator.php
Created October 6, 2012 10:31
Laravel Model Decorator
<?php
/**
* ModelDecorator Class
* Decorate Models to seperate out common logic
*
* @author Lucas Nolte <[email protected]>
*/
class Modeldecorator {
@lucasdinonolte
lucasdinonolte / decimal-point.coffee
Created September 27, 2012 15:31
Coffee Script Number Formatting
addComma = (number) ->
number = new String number
chars = number.split('').reverse()
i = 0
formatted = []
for char in chars
if (i%3) is 0 and i isnt 0
formatted.push('.')