| Key/Command | Description |
|---|---|
| Tab | Auto-complete files and folder names |
| Ctrl + A | Go to the beginning of the line you are currently typing on |
| Ctrl + E | Go to the end of the line you are currently typing on |
| Ctrl + U | Clear the line before the cursor |
| Ctrl + K | Clear the line after the cursor |
| Ctrl + W | Delete the word before the cursor |
| Ctrl + T | Swap the last two characters before the cursor |
This file contains hidden or 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
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
This file contains hidden or 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
| // | |
| // | |
| // NativeAudio.m | |
| // NativeAudio | |
| // | |
| // Created by Sidney Bofah on 2014-06-26. | |
| // | |
| #import "NativeAudio.h" | |
| #import <AVFoundation/AVAudioSession.h> |
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # What is that | |
| # ============ | |
| # | |
| # This script will help you setting up your digital ocean | |
| # infrastructure with Ansible v2.0+ and DO API v2 | |
| # | |
| # Usually, when working with DO, one is supposed to use digital_ocean.py | |
| # inventory file, and spin up instances in a playbook. |
This file contains hidden or 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 'openssl' | |
| require 'base64' | |
| class CryptoService | |
| def initialize | |
| end | |
| def generate_key | |
| Base64.encode64(_private_key.private_encrypt(token)).gsub(/\n/, '') |
This file contains hidden or 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
| # Configure colors, if available. | |
| if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
| c_reset='\[\e[0m\]' | |
| c_user='\[\e[0;32m\]' | |
| c_path='\[\e[1;34m\]' | |
| c_git_clean='\[\e[0;37m\]' | |
| c_git_staged='\[\e[0;32m\]' | |
| c_git_unstaged='\[\e[0;31m\]' | |
| else | |
| c_reset= |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
This class makes it easier to generate a leaderboard that complies with the Standard Competition Ranking system. That is, it takes joint/tied positions into account, and adjusts the positions accordingly.
Take the following list of users and points for example:
User | Points
1 35
2 35