Skip to content

Instantly share code, notes, and snippets.

@aliang
aliang / Mac SSH Autocomplete
Created June 14, 2011 07:14
Add auto complete to your ssh, put into your .bash_profile
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
sed -e s/,.*//g | \
grep -v ^# | \
uniq | \
grep -v "\[" ;
# Thanks to this post:
# http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x
$ brew install cabextract
$ cd ~/Downloads
$ mkdir consolas
$ cd consolas
$ curl -O http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe
$ cabextract PowerPointViewer.exe
$ cabextract ppviewer.cab
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 23, 2024 04:22
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@sharipov-ru
sharipov-ru / development.rb
Last active December 20, 2016 14:20 — forked from dhh/gist:2492118
config.middleware.use RoutesReloader
@mebezac
mebezac / Gemfile
Created December 15, 2014 20:18 — forked from flomotlik/Gemfile
gem 'foreman'
gem 'puma'
@Tylerian
Tylerian / _app.tsx
Created October 18, 2019 16:09
Next.js with Apollo implementation
import NextApp, {
AppInitialProps
} from "next/app";
import {
ApolloClient
} from "apollo-client";
import {
ApolloProvider
@cgimenes
cgimenes / enum.md
Created August 25, 2021 10:27
Better enum solution for Rails

Migration Generation

rails g migration add_status_to_catalogs status:catalog_status

Migration

class AddStatusToCatalogs < ActiveRecord::Migration[5.1]
  def up
 execute &lt;&lt;-SQL