/(^Received:.*?\n)(?=[a-zA-Z-]+:|\n)/im
This file contains 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
~ % mysql test | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 279 | |
Server version: 5.6.21 Homebrew | |
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. | |
Oracle is a registered trademark of Oracle Corporation and/or its | |
affiliates. Other names may be trademarks of their respective | |
owners. |
This file contains 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
// | |
// Illustrates a potential method for injecting environment settings into the | |
// Ember environment provided by Ember CLI as a serialized JSON blob in a | |
// META tag. | |
// | |
// You could return this from a backend, such as Rails, that is aware of the | |
// variables for the given environment and load this with a SCRIPT tag before | |
// loading the Ember application. | |
// | |
(function() { |
This file contains 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
Date.monthNames = [ | |
'January', 'February', 'March', 'April', 'May', 'June', 'July', | |
'August', 'September', 'October', 'November', 'December' | |
]; | |
Date.dayNames = [ | |
'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', | |
'Saturday' | |
]; |
This file contains 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
class Dir | |
def self.clone!(source, destination, exclude) | |
exclude = ["^\\.{1,2}$"].concat(exclude).uniq | |
FileUtils.mkdir destination unless Dir.exists? destination | |
Dir.foreach(source) do |file| | |
next if exclude.detect { |pattern| file.match(/#{pattern}/i) } |
This file contains 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
(function($) { | |
$.fn.centerPoint = function() | |
{ | |
return { | |
x: this.position().left + (this.outerWidth(true) / 2), | |
y: this.position().top + (this.outerHeight(true) / 2) | |
} | |
}; |
This file contains 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
install: --user-install --no-document | |
update: --user-install --no-document |
This file contains 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
# | |
# Justin's "Staple" ZSH Theme | |
# | |
# For use with Oh-My-Zsh. Place in ~/.oh-my-zsh/custom. | |
# | |
autoload -U add-zsh-hook | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}[%{$fg_no_bold[green]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="" |
This file contains 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
[mysql] | |
user = root | |
[mysqladmin] | |
user = root |
This file contains 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
(function() { | |
// | |
// Iterates over an array of numbers and returns the sum. Example: | |
// | |
// _.sum([1, 2, 3]) => 6 | |
// | |
_.sum = function(obj) { | |
if (!$.isArray(obj) || obj.length == 0) return 0; | |
return _.reduce(obj, function(sum, n) { |
OlderNewer