- Add rvm to the plugins line of your
~/.zshrc file
- At the bottom of your aliases, add an alias for rvm-prompt
alias rvm-prompt=$HOME/.rvm/bin/rvm-prompt
- Reload (you may not need this line, but if you do, put it below the above)
source $ZSH/oh-my-zsh.sh
- Add the following on the line below:
RPROMPT="%{$fg[blue]%}\$(~/.rvm/bin/rvm-prompt s i v g) %{$fg[yellow]%}[%*]%{$fg[default]%}"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy table data to another table. | |
CREATE TABLE new_table LIKE old_table; | |
INSERT new_table SELECT * FROM old_table; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generate random password | |
Math.random().toString(36).substr(2); // return some of "ms6ons4p132qpvi" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
gutil = require('gulp-util'), | |
coffee = require('gulp-coffee'), | |
uglify = require('gulp-uglify'), | |
sass = require('gulp-sass'), | |
concat = require('gulp-concat'), | |
autoPrefixer = require('gulp-autoprefixer'), | |
minifyCss = require('gulp-minify-css'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |_ _ __ ___ _ ___ __ # | |
# | __| '_ ` _ \| | | \ \/ / # | |
# | |_| | | | | | |_| |> < # | |
# \__|_| |_| |_|\__,_/_/\_\ # | |
# 1 0 | VIM | 2:bash 20:04 | |
# [ Reset Prefix ] {{{1 | |
set -g prefix C-a | |
bind-key a send-prefix # for nested tmux sessions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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://github.com/Lokaltog/powerline-fonts). | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "securerandom" | |
puts 'Enter prefix: ' | |
prefix = gets.chomp | |
p "mb_#{prefix}_" + SecureRandom.urlsafe_base64(nil, true) + SecureRandom.urlsafe_base64(nil, true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl ~/.local/bin/sublime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config} | |
ln -s ~/.vim $XDG_CONFIG_HOME/nvim | |
ln -s ~/.vimrc $XDG_CONFIG_HOME/nvim/init.vim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$locationProvider.html5Mode({ | |
enabled: true, | |
requireBase: false | |
}); |
OlderNewer