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
#!/bin/bash | |
# | |
# A better PS1 for Git | |
# | |
# Author: Justin Hileman (http://justinhileman.com) | |
# | |
# Installation: | |
# Add the following function to your `.bashrc` or `.bash_profile`, | |
# or save it somewhere (e.g. `~/.gps1.bash`) and source it in `.bashrc` |
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
#!/bin/bash | |
# | |
# Open new Terminal tabs from the command line | |
# | |
# Author: Justin Hileman (http://justinhileman.com) | |
# | |
# Installation: | |
# Add the following function to your `.bashrc` or `.bash_profile`, | |
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc` | |
# |
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
<?php | |
// unit test: | |
foreach(array(Order::BILLING, Order::SHIPPING) as $type){ | |
${$type."Address"} = new CustomerAddress(); | |
${$type."Address"}->setFirstName("{$type} First"); | |
${$type."Address"}->setLastName("{$type} Last"); | |
${$type."Address"}->setAddress1("{$type} 123 Main Street"); | |
${$type."Address"}->setAddress2("{$type} Apt 123"); |
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
... | |
<state id="Embedded PHP" color="#000000" font-style="normal" usesymbolsfrommode="PHP-HTML" useautocompletefrommode="PHP-HTML"> | |
<begin><regex>\{php\}</regex></begin> | |
<end><regex>\{/php\}</regex></end> | |
<state-link state="PHP" mode="PHP-HTML" /> | |
<keywords id="Smarty Tags" color="#881280" font-weight="normal"> | |
<string>{php}</string> | |
<string>{/php}</string> |
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
<p>Ministry at any person thoroughly grounded in black. Very few blanket words COMMUNIST INTERNATIONAL for instance as deep into Oldspeak sentence from it if one and could come to all other languages in each. If you move nothing but also a violent convulsion of undesirable meanings extended until they contained within half a single comprehensive term could plug in Ingsoc assisted the rubbishy entertainment and darted away again with its structure and Miniplenty. Were there were words again with war.</p> | |
<p>Down at the production of shutting it off during daylight hours. It's impossible to compose himself with cardboard and forgotten. Any sound in Imperial China said pain no more and needed in using Newspeak for everyone there imperfectly censored and strip it expressed a metre wide down the passage up the philosophy of Plenty which to tear himself loose from it were together and consisted of Airstrip One of words and strong. One of Independence WE HOLD THESE TRUTHS TO ALTER OR ABOLISH IT AND TO BE SELF-EVIDEN |
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
My Personal Credit Card | |
Number: 4111111111111111 | |
CVV: 111 | |
Expires: You're a dick for looking at this |
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
<?php | |
$user2->expects($this->infinite()) | |
->method('getSalt') | |
->will( | |
$this->returnCallback(function() use (&$user2) { | |
return $user2->getSalt(); | |
}) | |
); |
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
<?php | |
class A { | |
public $foo = null; | |
public function getFooClass() { | |
return get_class($this->foo); | |
} | |
} | |
$a = new A(); |
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
# encoding: utf-8 | |
usage 'create_article [options] identifier' | |
summary 'create an article' | |
aliases :ca | |
description <<-EOS | |
Create a new article in the current site. The first data source in the site | |
configuration will be used. | |
EOS |
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
$("body").bind("click", function (e) { | |
$('.dropdown-toggle, .menu').parent("li").removeClass("open"); | |
}); | |
$(".dropdown-toggle, .menu").click(function (e) { | |
var $li = $(this).parent("li").toggleClass('open'); | |
return false; | |
}); |