Skip to content

Instantly share code, notes, and snippets.

View rtfpessoa's full-sized avatar

Rodrigo Fernandes rtfpessoa

View GitHub Profile
@rtfpessoa
rtfpessoa / openvpn-client-key-gen.sh
Last active April 16, 2022 19:25
OpenVPN Client Key Generator
#!/bin/bash
#
# OpenVPN Client Key Generation Script
#
# Author: rtfpessoa
# Date: 03-09-2016
#
# Based on the guide:
# * https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04
@rtfpessoa
rtfpessoa / lazy-load-nvm.sh
Created August 26, 2016 11:42
NVM lazy loading script
#!/bin/bash
#
# NVM lazy loading script
#
# NVM takes on average half of a second to load, which is more than whole prezto takes to load.
# This can be noticed when you open a new shell.
# To avoid this, we are creating placeholder function
# for nvm, node, and all the node packages previously installed in the system
# to only load nvm when it is needed.
@rtfpessoa
rtfpessoa / play.scala
Created June 4, 2016 18:51 — forked from lihaoyi/play.scala
play.scala
/**
* Single-file play framework application! Make sure everything
* works, as this is the test case that un-earthed #371
*/
load.ivy("com.typesafe.play" %% "play" % "2.5.0")
load.ivy("com.typesafe.play" %% "play-netty-server" % "2.5.0")
load.ivy("org.scalaj" %% "scalaj-http" % "2.2.1")
@
@rtfpessoa
rtfpessoa / S3Handler.scala
Last active May 25, 2016 20:12
S3Handler for Coursier
package coursier.cache.protocol
import java.io.InputStream
import java.net.{URL, URLConnection, URLStreamHandler}
import awscala.Credentials
import awscala.s3.{Bucket, S3, S3Object}
import com.amazonaws.services.s3.model.GetObjectRequest
/*
@rtfpessoa
rtfpessoa / css_regression_testing.md
Created May 21, 2016 22:39 — forked from cvrebert/css_regression_testing.md
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@rtfpessoa
rtfpessoa / .config
Last active August 11, 2019 06:42 — forked from sit/gitproxy-socat
Wrappers around socat and netcat to use git behind a proxy
# Use netcat to proxy git ssh through a proxy.
# Useful if you are trying to clone ssh:// from inside a company.
#
# Save this file as `~/.ssh/config`
#
# See http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/ for Emil Sit's original HTTP proxy script.
# See http://www.jones.ec/blogs/a/entry/using_git_through_a_socks/ for updated SOCKS version.
#
ProxyCommand nc -x 10.0.0.84:1986 %h %p
@rtfpessoa
rtfpessoa / keybase.md
Created April 6, 2016 22:35
keybase.md

Keybase proof

I hereby claim:

  • I am rtfpessoa on github.
  • I am rtfpessoa (https://keybase.io/rtfpessoa) on keybase.
  • I have a public key ASA4htimtW6SmHp6UKNUcAXTZk7TKbvdYhnIBLrL6m1b0Qo

To claim this, I am signing this object:

@rtfpessoa
rtfpessoa / AppDelegate.m
Last active March 19, 2016 15:43
React native automatic server ip generation
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "AppDelegate.h"
@rtfpessoa
rtfpessoa / handle-ctrl-c.py
Created March 19, 2016 11:28
Handle CTRL+C in Python
#!/usr/bin/env python
import signal
import sys
def signal_handler(signal, frame):
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
@rtfpessoa
rtfpessoa / private.xml
Last active March 19, 2016 16:10
Karabiner Keybins
<?xml version="1.0"?>
<root>
<item>
<name>Media Keys Always</name>
<identifier>Media-Keys-Always</identifier>
<!-- Volume Up -->
<!--
<autogen>
__KeyToKey__
KeyCode::PAGEUP, ModifierFlag::FN, ConsumerKeyCode::VOLUME_UP