Skip to content

Instantly share code, notes, and snippets.

View alanmaciel's full-sized avatar
Work and play, same thing, differing conditions. ~Mark Twain

Alan Maciel alanmaciel

Work and play, same thing, differing conditions. ~Mark Twain
View GitHub Profile
@alanmaciel
alanmaciel / gist:3990052
Created October 31, 2012 21:35
Init Guard with Spork
$ guard init spork
@alanmaciel
alanmaciel / gist:4007866
Created November 3, 2012 16:43
MY LOVELY PROMPT
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export GIT_PS1_SHOWSTASHSTATE=true
@alanmaciel
alanmaciel / gist:4007917
Created November 3, 2012 17:02
MY LOVELY ALIASES FILE
# Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"
# Shortcuts
alias d="cd ~/Dropbox"
@alanmaciel
alanmaciel / gist:4033518
Created November 7, 2012 18:42
Generate a .rvmrc Faaassst
A quick way to generate an .rvmrc file is to run a command like this inside the project:
rvm use 1.9.3-p194@rails3 --rvmrc
@alanmaciel
alanmaciel / gist:4069889
Created November 14, 2012 02:25
run-command-on-git-revisions origin/master master 'python runtests.py'
#!/bin/bash
#
# This script runs a given command over a range of Git revisions. Note that it
# will check past revisions out! Exercise caution if there are important
# untracked files in your working tree.
#
# This came from Gary Bernhardt's dotfiles:
# https://github.com/garybernhardt/dotfiles
#
# Example usage:
@alanmaciel
alanmaciel / spacemacs-keybindings
Created April 23, 2017 03:48 — forked from adham90/spacemacs-keybindings
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
<!DOCTYPE html>
<html>
<head>
<title>Application</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
before_action :set_movie
private
def set_movie
@movie = Movie.find(params[:movie_id])
end
@import "colors";
a.button {
display: inline-block;
border: 1px $subdued-color solid;
border-radius: 4px;
padding: 4px 6px;
text-decoration: none;
&:hover {
background-color: $subdued-color;