Skip to content

Instantly share code, notes, and snippets.

View gastonambrogi's full-sized avatar
🌱
Growing

Gastón Ambrogi gastonambrogi

🌱
Growing
  • Freelancer Frontend Developer
  • Buenos Aires, Argentina
  • 04:11 (UTC -03:00)
  • X @gastonambrogi
View GitHub Profile
#!/usr/bin/env bash
# script: watch
# author: Mike Smullin <mike@smullindesign.com>
# license: GPLv3
# description:
# watches the given path for changes
# and executes a given command when changes occur
# usage:
# watch <path> <cmd...>
#
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
//GRobotronics 29/3/2014
unsigned char i;
unsigned char j;
/*Port Definitions*/
int Max7219_pinCLK = 2;
int Max7219_pinCS = 1;
int Max7219_pinDIN = 0;
function getZoomCompensatedBoundingRect(fabricObject){
//fabricObject is the object you want to get the boundingRect from
fabricObject.setCoords();
var boundingRect = fabricObject.getBoundingRect();
var zoom = canvas.getZoom();
var viewportMatrix = canvas.viewportTransform;
//there is a bug in fabric that causes bounding rects to not be transformed by viewport matrix
//this code should compensate for the bug for now
@gastonambrogi
gastonambrogi / gitflow-breakdown.md
Last active April 7, 2017 18:25 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

i3 Window Manager
Open terminal: $mod+Enter
Split window vertically: $mod+v command
Split window horizontally: $mod+h command
Change window focus: $mod+arrow-keys
Move focused windows: $mod+Shift+arrow-keys
Toggle splith/splitv: $mod+e
Switch to stacking mode: $mod+s
Switch to tabbed mode: $mod+w

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@gastonambrogi
gastonambrogi / tmux-cheatsheet.markdown
Created April 10, 2017 12:27 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@gastonambrogi
gastonambrogi / 0_reuse_code.js
Created April 11, 2017 00:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console