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
  • 02:24 (UTC -03:00)
  • X @gastonambrogi
View GitHub Profile
@gastonambrogi
gastonambrogi / gitflow-breakdown.md
Created September 23, 2019 18:43 — forked from morrismatts/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

@gastonambrogi
gastonambrogi / index.html
Created August 13, 2019 20:11 — forked from joshuakemmerling/index.html
Pure CSS horizontal scrolling shadows
<!DOCTYPE html>
<html>
<head>
<style>
.scrollbox {
overflow: auto;
width: 200px;
max-height: 200px;
margin: 50px auto;
@gastonambrogi
gastonambrogi / MySQL_macOS_Sierra.md
Created April 6, 2019 18:40 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@gastonambrogi
gastonambrogi / whiteboardCleaner.md
Created May 24, 2018 16:52 — forked from lelandbatey/whiteboardCleaner.md
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@gastonambrogi
gastonambrogi / example.component.ts
Created September 8, 2017 17:16 — forked from ckimrie/example.component.ts
Example on how to achieve RxJS observable caching and storage in Angular 2+. Ideal for storing Http requests client side for offline usage.
import { Component, OnInit, OnDestroy } from '@angular/core';
import {Http} from "@angular/http";
import { LocalCacheService } from "./local-cache.service";
@Component({
selector: 'app-example',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class ExampleComponent implements OnInit, OnDestroy {
@gastonambrogi
gastonambrogi / gist:5c077da8924891d492babad619b24e60
Created May 31, 2017 14:29 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@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
@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

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

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