Skip to content

Instantly share code, notes, and snippets.

View gbalbuena's full-sized avatar
🏕️

Gabriel gbalbuena

🏕️
View GitHub Profile
@gbalbuena
gbalbuena / Dockerfile
Created June 19, 2019 00:07
terraform-aws-cli-alpine docker
FROM alpine:edge
RUN apk add --update
RUN apk add ca-certificates
RUN apk add terraform
RUN apk add aws-cli --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
ADD . /app
WORKDIR /app
@gbalbuena
gbalbuena / superagent.js
Last active November 3, 2022 10:50 — forked from charleskorn/superagent.js
A Jest mock for superagent. Place in your __mocks__ directory.
llet mockDelay;
let mockError;
let mockResponse = {
get: jest.fn(),
ok: true,
status: 200,
toError: jest.fn(),
};
let mockResponseBodies;
@gbalbuena
gbalbuena / oauth2.js
Last active December 1, 2021 00:31
OAuth2.js
import axios from 'axios';
import queryString from 'query-string';
import base64 from 'base-64';
export default class OAuth2 {
constructor({
url, consumerKey, consumerSecret, timeout, proxy
}) {
this.url = url;
this.config = {
@gbalbuena
gbalbuena / .babelrc
Created February 13, 2018 10:34 — forked from thejmazz/.babelrc
async/await with webpack+babel
{
"presets": ["es2015"],
"plugins": ["transform-async-to-generator"]
}
@gbalbuena
gbalbuena / iterm-profile.json
Last active November 13, 2019 23:17
Iterm2 personal profile
{
"Right Option Key Sends" : 0,
"Tags" : [
],
"Ansi 12 Color" : {
"Red Component" : 0.40903013944625854,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 1,
@gbalbuena
gbalbuena / iterm2-solarized.md
Created July 30, 2017 00:48 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
#
@gbalbuena
gbalbuena / latency.markdown
Created March 30, 2017 13:34 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

ATOM_PACKAGES=(
minimap
minimap-highlight-selected
file-icons
emmet
language-haml
react
autocomplete-modules
docblockr
@gbalbuena
gbalbuena / capybara cheat sheet
Created October 3, 2016 16:23 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')