Skip to content

Instantly share code, notes, and snippets.

View yriveiro's full-sized avatar
🧙‍♀️
Practicioner of Arcane and Forgotten Sorcery

Yago Riveiro yriveiro

🧙‍♀️
Practicioner of Arcane and Forgotten Sorcery
View GitHub Profile
@yriveiro
yriveiro / clamav-mac.md
Created August 7, 2017 15:42 — forked from Uchean/clamav-mac.md
Get ClamAV running on Mac OS X (using Homebrew)

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd process, you'll need a copy of the ClamAV databases.

Create a freshclam.conf file and configure as so

@yriveiro
yriveiro / vim
Created March 13, 2017 16:27
vimrc
"
" ██╗ ██╗ ██╗ ███╗ ███╗ ██████╗ ██████╗
" ██║ ██║ ██║ ████╗ ████║ ██╔══██╗ ██╔════╝
" ██║ ██║ ██║ ██╔████╔██║ ██████╔╝ ██║
" ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║ ██╔══██╗ ██║
" ██╗╚████╔╝ ██║ ██║ ╚═╝ ██║ ██║ ██║ ╚██████╗
" ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝
"
""""""""""""""""""""""""""""""
@yriveiro
yriveiro / gist:2b6607bcc2fdfa21184560e99b39137b
Created February 6, 2017 15:20 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@yriveiro
yriveiro / gist:316294c6bc86f99928fb415c38f846ea
Created February 6, 2017 15:20 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@yriveiro
yriveiro / latency.txt
Created November 12, 2016 08:35 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@yriveiro
yriveiro / Monaco for Powerline Nerd Font.otf
Last active September 24, 2018 02:03
Monaco for Nerd Font
@yriveiro
yriveiro / index.md
Created September 22, 2016 14:35 — forked from alekseykulikov/index.md
SUIT CSS naming convention for React.js application

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 6561 lines of CSS (and just 5 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@yriveiro
yriveiro / close_hidden_buffers.vim
Created August 3, 2016 09:34 — forked from skanev/close_hidden_buffers.vim
Close all hidden buffers in Vim
command! CloseHiddenBuffers call s:CloseHiddenBuffers()
function! s:CloseHiddenBuffers()
let open_buffers = []
for i in range(tabpagenr('$'))
call extend(open_buffers, tabpagebuflist(i + 1))
endfor
for num in range(1, bufnr("$") + 1)
if buflisted(num) && index(open_buffers, num) == -1
@yriveiro
yriveiro / git sync
Created February 28, 2016 22:12 — forked from miguelgonz/git sync
git sync
#!/bin/sh
#To make use of this just copy it to your path, +x it, and do git sync
MAIN_BRANCH="develop"
CURRENT_CHANGES=`git status --porcelain`
CURRENT_BRANCH=`git symbolic-ref -q --short HEAD`
if [ "$CURRENT_CHANGES" != "" ]; then
git stash --include-untracked
fi
# 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 ->