(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
<?php | |
function random_string($length, $max = false) | |
{ | |
if (is_int($max) && $max > $length) { | |
$length = mt_rand($length, $max); | |
} | |
$output = ''; | |
for ($i = 0; $i < $length; $i++) { | |
$which = mt_rand(0, 2); |
git config --global core.excludesfile ~/.gitignore | |
echo .DS_Store >> ~/.gitignore |
{ | |
/* ~/Library/KeyBindings/DefaultKeyBinding.dict | |
See https://gist.github.com/zsimic/1367779, prefix cheatsheet: | |
Char Short Key | |
$ S- Shift ⇧ | |
^ C- CTRL ⌃ | |
~ O- Option ⌥ (⊞ Win key position on PC) | |
@ M- Command ⌘ (Alt position on PC) | |
# Numeric Keypad |
<?php | |
function randomPassword( $len = 10, $ucfirst = true, $spchar = true ){ | |
/* Programmed by Christian Haensel | |
* christian@chftp.com | |
* http://www.chftp.com | |
* | |
* Exclusively published on weberdev.com. | |
* If you like my scripts, please let me know or link to me. | |
* You may copy, redistribute, change and alter my scripts as | |
* long as this information remains intact. |
// CSS Color Names | |
// Compiled by @bobspace. | |
// | |
// A javascript object containing all of the color names listed in the CSS Spec. | |
// This used to be a big array, but the hex values are useful too, so now it's an object. | |
// If you need the names as an array use Object.keys, but you already knew that! | |
// | |
// The full list can be found here: https://www.w3schools.com/cssref/css_colors.asp | |
// Use it as you please, 'cuz you can't, like, own a color, man. |
# Option defaults | |
OPT="value" | |
# getopts string | |
# This string needs to be updated with the single character options (e.g. -f) | |
opts="fvo:" | |
# Gets the command name without path | |
cmd(){ echo `basename $0`; } |
#!/bin/sh | |
# This script will install Command Line Tools for Xcode on a fresh installation of OS X. | |
# Usage: curl https://raw.github.com/gist/3053979/install-command-line-tools-for-xcode.sh | sh | |
DMG='command_line_tools_for_xcode_june_2012.dmg' | |
cd $HOME/Downloads | |
if [ ! -f ./$DMG ]; then | |
echo 'Command Line Tools for Xcode not downloaded.' |
Add this to Info.plist
in /System/Library/Spotlight/RichText.mdimporter/Contents/
and Spotlight will search for source code files.
<string>public.c-header</string>
<string>public.c-plus-plus-header</string>
<string>public.c-source</string>
<string>public.objective-c-source</string>
public.c-plus-plus-source