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| =begin | |
| Capistrano deployment email notifier for Rails 3 | |
| Do you need to send email notifications after application deployments? | |
| Christopher Sexton developed a Simple Capistrano email notifier for rails. You can find details at http://www.codeography.com/2010/03/24/simple-capistrano-email-notifier-for-rails.html. | |
| Here is Rails 3 port of the notifier. | |
| The notifier sends an email after application deployment has been completed. |
| module Jekyll | |
| require 'coffee-script' | |
| class CoffeeScriptConverter < Converter | |
| safe true | |
| priority :normal | |
| def matches(ext) | |
| ext =~ /coffee/i | |
| end |
| ## Prepare ################################################################### | |
| # Remove RVM | |
| rvm implode | |
| # Ensure your homebrew is working properly and up to date | |
| brew doctor | |
| brew update | |
| ## Install ################################################################### |
| require 'socket' | |
| require 'mocks' | |
| TCP_NEW = TCPSocket.method(:new) unless defined? TCP_NEW | |
| # | |
| # Example: | |
| # mock_tcp_next_request("<xml>junk</xml>") | |
| # | |
| class FakeTCPSocket |
| # Install rvm system-wide | |
| bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) | |
| # Update the packages | |
| apt-get update | |
| apt-get upgrade | |
| apt-get install build-essential | |
| # get the packages required by ruby | |
| rvm pkg install zlib |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| function git_prompt_info() { | |
| ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
| echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
| } |
| def setup_alarm_notification(for_day, with_switch) | |
| alarm_date = App::Persistence[for_day] | |
| alarm_is_set = App::Persistence[with_switch]; | |
| if (alarm_is_set && alarm_date && (alarm_date > Time.now)) | |
| local_notification = UILocalNotification.alloc.init | |
| local_notification.fireDate = NSDate.dateWithString( alarm_date.to_s ) | |
| local_notification.alertBody = "Time to get up! #{alarm_date.strftime('%H:%M')}" | |
| local_notification.soundName = UILocalNotificationDefaultSoundName | |
| local_notification.applicationIconBadgeNumber = 1 |
| #!/bin/bash | |
| # | |
| # Installs the previous version of a Homebrew formula | |
| # | |
| # Usage: brewv formula_name desired_version | |
| # | |
| # Based on http://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula#9832084 | |
| # | |
| # Author: Matti Schneider <[email protected]> (http://mattischneider.fr) |