Skip to content

Instantly share code, notes, and snippets.

View fredmp's full-sized avatar

Frederico Porto fredmp

View GitHub Profile
@fredmp
fredmp / alias_matchers.md
Created July 10, 2018 19:40 — forked from JunichiIto/alias_matchers.md
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@fredmp
fredmp / ubuntu_agnoster_install.md
Created February 11, 2018 20:32 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

# Converts an array of arbitrarily nested arrays of integers into a flat array of integers
#
# == Parameters:
# array
# an array of arbitrarily nested arrays of integers
# accumulator (optional)
# an optional array of integers to be used as an initial value
#
# == Returns:
# A flat array of integers
# 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 ->
@fredmp
fredmp / fluid-layout-example.html
Created September 11, 2016 03:08
HTML - Fluid Layout Example - Header-3-Columns-Sticky-Footer
<html>
<head>
<title>Fluid Layout Example - Header-3-Columns-Sticky-Footer</title>
<style type="text/css" href="https://necolas.github.io/normalize.css/4.1.1/normalize.css"></style>
<style type="text/css">
html, body {
margin: 0;

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@fredmp
fredmp / springer-free-maths-books.md
Created December 29, 2015 18:21 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@fredmp
fredmp / gist:5384919
Created April 15, 2013 00:46
My .bash_profile configuration
eval "$(rbenv init -)"
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
export PS1="\u > \W$ "
bind "set completion-ignore-case on"
bind "set show-all-if-ambiguous on"
alias-help () {
echo "Custom Aliases Usage"