most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
#!/usr/bin/osascript | |
-- calendar from which to ignore events | |
set TASKS_CALENDAR to "Toodledo iCal" | |
-- the current timestamp | |
set now to (current date) | |
-- midnight this morning | |
set today to now - (time of now) | |
-- midnight tomorrow morning | |
set tomorrow to (today) + (24 * 60 * 60) | |
-- list of output lines |
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
$ sudo su | |
# apt-get install postgresql | |
# su postgres | |
$ createuser -P -s -e developer | |
Enter password for new role: <PASSWORD> | |
And now you're ready to set up your project on postgres... |
# Baylor Rae's Prompt Theme | |
# based on wunjo prompt theme and modified for oh-my-zsh | |
# shows me all files and folders when I change directories | |
cd() { builtin cd "$@"; ls } | |
# uses ~ instead of /Users/baylorrae/ | |
pwd() { print -D $PWD } | |
# I substituted my own so the commit times were live |
As configured in my dotfiles.
start new:
tmux
start new with session name:
Many programming languages, including Ruby, have native boolean (true and false) data types. In Ruby they're called true
and false
. In Python, for example, they're written as True
and False
. But oftentimes we want to use a non-boolean value (integers, strings, arrays, etc.) in a boolean context (if statement, &&, ||, etc.).
This outlines how this works in Ruby, with some basic examples from Python and JavaScript, too. The idea is much more general than any of these specific languages, though. It's really a question of how the people designing a programming language wants booleans and conditionals to work.
If you want to use or share this material, please see the license file, below.
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
#!/usr/bin/perl | |
# Emacs starter for Emacs mac port | |
# Thanks to Aquamacs Project and David Reitter | |
my $args = ""; | |
my $tmpfiles = ""; | |
for my $f (@ARGV) { |