Skip to content

Instantly share code, notes, and snippets.

View luisfarzati's full-sized avatar

Luis Farzati luisfarzati

View GitHub Profile
# Filesystem
alias la='ls -lah'
alias w='cd ~/w'
# Git
alias gad='git add'
alias gap='git add --patch'
alias gau='git add --update'
alias gbr='git branch'
alias gbra='git branch --all'
@luisfarzati
luisfarzati / com.googlecode.iterm2.plist
Last active May 19, 2019 05:51
iTerm2 preferences
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AdjustWindowForFontSizeChange</key>
<string>0</string>
<key>AppleAntiAliasingThreshold</key>
<string>1</string>
<key>AppleScrollAnimationEnabled</key>
<string>0</string>
@luisfarzati
luisfarzati / app.js
Created May 6, 2017 01:44
Node.js hot-reloading using Cluster
const express = require('express')
const app = express()
app.get('/', (req, res) => {
res.status(200)
.contentType('application/json')
.json({ hello: 'world' })
})
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@luisfarzati
luisfarzati / countries.json
Created April 4, 2014 14:16
Countries as an object where the key is the ISO 3166-1 alpha-2 code and the values is the country name.
{
"AF": "Afghanistan",
"AX": "Åland Islands",
"AL": "Albania",
"DZ": "Algeria",
"AS": "American Samoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarctica",
@luisfarzati
luisfarzati / keybase.md
Created March 27, 2014 12:10
Gist for Keybase.io

Keybase proof

I hereby claim:

  • I am luisfarzati on github.
  • I am luisfarzati (https://keybase.io/luisfarzati) on keybase.
  • I have a public key whose fingerprint is D575 9FB5 776B 4D6F AA5F 246F 4DDA 7A50 B5CA 9A61

To claim this, I am signing this object:

@luisfarzati
luisfarzati / buffers.js
Created March 6, 2014 02:17
Simple/Circular buffers for JavaScript
function BufferOverflowError(message) {
this.message = message;
}
BufferOverflowError.prototype = new Error();
BufferOverflowError.prototype.constructor = BufferOverflowError;
function Buffer(size) {
this.__size = size || Infinity;
this.__buffer = [];
}
@luisfarzati
luisfarzati / desc.md
Last active August 29, 2015 13:56 — forked from odino/desc.md
My submission for the Namshi coding challenge.

Coding challenge: cartified!

✔ the cart needs to be implemented as an AngularJS service

✔ the cart should be retrieved from the localStorage, where it's stored under the key cart

✔ every time an action is performed on the cart, it should be persisted on the localStorage

✔ the cart should only know about item IDs and their quantity

@luisfarzati
luisfarzati / demo.js
Created February 17, 2014 19:50
AngularJS & d3 AirPair session
angular.module('ngd3', [])
.controller('MyController', function ($scope) {
$scope.myData = [
{ date:"1-May-12", close:"582.13" },
{ date:"30-Apr-12", close:"583.98" },
{ date:"27-Apr-12", close:"603.00" },
{ date:"26-Apr-12", close:"607.70" },
{ date:"25-Apr-12", close:"610.00" },