Skip to content

Instantly share code, notes, and snippets.


Fabio Neves fzero

View GitHub Profile
fzero / 1 tmux.conf
Last active Jun 24, 2022
Some tmux configurations, scripts and aliases I use.
View 1 tmux.conf
# I prefer ctrl-a - helps when dealing with machines that only have Screen
unbind C-b
set -g prefix C-a
# Making windows purrty
set-window-option -g status-bg cyan
set-window-option -g status-fg black
set-window-option -g window-status-current-bg black
set-window-option -g window-status-current-fg white
fzero / keymap.cson
Created Jan 24, 2017
Fix atom keymap with vim-mode-plus
View keymap.cson
'ctrl-c': 'core:copy'
'ctrl-x': 'core:cut'
'ctrl-v': 'core:paste'
'ctrl-c': 'core:copy'
'ctrl-x': 'core:cut'
'ctrl-v': 'core:paste'
fzero / 1
Last active Aug 4, 2021
My bash customizations with git-aware prompt and some aliases.
View 1
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Prompt goodness
# This is for my local machine, so I don't display the host to save space (I do on remote servers).
# It looks like this:
# ~/Code/some_dir(my-git-branch)$
fzero / flickrdl.rb
Created Dec 20, 2019
Threaded download from Flickr (not a complete script, but the main part)
View flickrdl.rb
require 'flickr_fu'
require 'httparty'
require 'pry'
DIR = "./photos"
# Prepare the downloadin'
`mkdir -p #{DIR}`
fzero /
Created Dec 7, 2016
Fix Postgres encoding issue

Is you attempt to do a bin/rails db:setup or something similar and it complains like this:

PG::InvalidParameterValue: ERROR:  encoding "UTF8" does not match locale "en_US"
DETAIL:  The chosen LC_CTYPE setting requires encoding "LATIN1".

Run these commands in your Vagrant box:

fzero / threads.rb
Last active Jul 30, 2018
Ruby skeleton for parallel iteration using threads with thread count
View threads.rb
# Thread count control
# This is the collection of data you need to process with threads
collection = []
# A nice array to store your thread objects
threads = []
fzero /
Created May 28, 2018
RBC Frontend fundamentals - Advanced CSS
fzero /
Last active May 24, 2018
RBC Frontend fundamentals - Flexbox
fzero /
Last active May 22, 2018
RBC - Lecture notes - May 22, 2018

Intro to CSS

This is the code we've worked on during May 22 class. Feel free to use it as reference!

fzero / voice-recog.js
Last active Mar 16, 2018
Google Voice Recognition API example
View voice-recog.js
// We've followed documentation links and played with the example code a bit:
// Start here:
// If you need an audio editor, try Audacity:
// usage: node voice-recog.js soundfile.flac en-US
// The second argument is the language code (e.g. en-US, pt-BR, fr-CA...)