Skip to content

Instantly share code, notes, and snippets.

View andrielfn's full-sized avatar
🏠
Working from home

Andriel Nuernberg andrielfn

🏠
Working from home
View GitHub Profile
@andrielfn
andrielfn / Remoji.py
Last active November 10, 2016 11:01
Random Emoji for Sublime Text 3.
import sublime
import sublime_plugin
from random import choice
class RemojiCommand(sublime_plugin.TextCommand):
def run(self, edit):
emojis = [
'bowtie',
'smile',
'laughing',
@andrielfn
andrielfn / pack.sh
Created January 15, 2014 03:30
Create a Ruby deb package from compiled source.
fpm -s dir -t deb -n ruby21 -v 2.1 --description \
"Ruby 2.1 stable package" -C /tmp/ruby20 \
-p ruby2.1-x64.deb -d "libstdc++6 (>= 4.4.3)" \
-d "libc6 (>= 2.6)" -d "libffi5 (>= 3.0.4)" -d "libgdbm3 (>= 1.8.3)" \
-d "libncurses5 (>= 5.7)" -d "libreadline6 (>= 6.1)" \
-d "libssl1.0.0 (>= 1.0.0)" -d "zlib1g (>= 1:1.2.2)" \
-d "libyaml-0-2 (>= 0.1.3)" \
usr/bin usr/lib usr/share/man usr/include
@andrielfn
andrielfn / sublime-text.json
Last active August 29, 2015 13:58
Sublime Text configuration.
{
"auto_complete": true,
"auto_complete_selector": "source - comment",
"auto_indent": true,
"bold_folder_labels": true,
"detect_indentation": true,
"draw_white_space": "all",
"enable_tab_scrolling": false,
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
@andrielfn
andrielfn / ssh.go
Created November 15, 2014 04:35
Go lang SSH connection
package main
import (
"bytes"
"code.google.com/p/go.crypto/ssh"
"fmt"
"io/ioutil"
"os"
)
@andrielfn
andrielfn / populate.go
Created April 28, 2015 16:24
Script to populate MySQL databases up to the *size-limit*. OS X binary download: https://www.dropbox.com/s/2gecxhqkxa7wpmq/bombsql?dl=0.
package main
import (
"database/sql"
"fmt"
"log"
"os"
"strconv"
_ "github.com/go-sql-driver/mysql"
@andrielfn
andrielfn / main.go
Created June 16, 2015 00:47
UDP socket in Go.
package main
import (
"fmt"
"net"
"os"
)
/* A Simple function to verify error */
func CheckError(err error) {
@andrielfn
andrielfn / settings.json
Created December 4, 2015 17:34
My Sublime Text 3 config file.
{
"auto_complete": true,
"auto_complete_selector": "source - comment",
"auto_indent": true,
"bold_folder_labels": true,
"close_windows_when_empty": true,
"color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme",
"detect_indentation": true,
"draw_indent_guides": true,
"enable_tab_scrolling": false,
@andrielfn
andrielfn / settings.json
Created April 18, 2016 00:37
ST3 Afterglow theme config
{
"auto_complete": true,
"auto_complete_selector": "source - comment",
"auto_indent": true,
"bold_folder_labels": true,
"close_windows_when_empty": true,
"color_scheme": "Packages/Colorsublime - Themes/Afterglow.tmTheme",
"detect_indentation": true,
"draw_indent_guides": true,
"enable_tab_scrolling": false,

Rails Performance

Upgrade the Ruby version

Use Apache Benchmark (ab) to perform tests over each Ruby version.

Database

There are two mainly ways to do that:

@andrielfn
andrielfn / .scss-lint.yml
Last active January 24, 2017 00:44
The structure that I use to start new front-end projects. Download only the `frontend-init` and run it on your terminal. :)
# This is the lint file for .scss files. It uses https://github.com/causes/scss-lint
# to search through .scss files and point out errors.
# You can view these errors in your editor.
#
# Here's a link to all the default configurations
# https://github.com/causes/scss-lint/blob/master/config/default.yml
# below is our settings.
linters:
BangFormat: