I hereby claim:
- I am dbergey on github.
- I am dbergey (https://keybase.io/dbergey) on keybase.
- I have a public key ASBfG5XPjljGmWg9kwbljH3cC5_9VUb4cgrlDitDDcJJKwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
tell application "System Events" | |
if (count of (every application process whose name is "iChat")) > 0 then | |
activate application "iChat" | |
else | |
activate application "Adium" | |
end if | |
end tell |
if (type == 'blah') | |
var conditionalArea = { | |
stuff: "nonsense" | |
}; | |
else { | |
var conditionalArea = { | |
fillColor: { | |
linearGradient: [0, 0, 0, 300], | |
stops: [ | |
[0, Highcharts.getOptions().colors[0]], |
// add OS-specific classes for targeting a whole set of browser on one OS. | |
$('html').addClass('browser-os-'+ ( | |
navigator.userAgent.match(/Macintosh/) ? 'macos' : | |
navigator.userAgent.match(/Windows/) ? 'windows' : | |
navigator.userAgent.match(/Linux/) ? 'linux' : | |
'unknown') | |
) | |
// now add more general browser classes for targeting all version of any one browser. IE disabled since conditional comments added. | |
.addClass('browser-'+ ( | |
$.browser.msie ? 'ie' : |
<pre><?php | |
$herp = true; | |
$derp = false; | |
echo "$herp\n"; // --> 1 | |
echo "$derp\n"; // --> [NOTHING] | |
?></pre> |
// from: http://forum.jquery.com/topic/jquery-reading-comments-from-the-dom | |
jQuery.fn.comments = function(location) { | |
var location = location || "inside"; | |
var comments = []; | |
this.each(function() { | |
if (location == "inside") { | |
var children = this.childNodes | |
for (var i = 0; i < children.length; i++) { | |
var child = children[i]; |
document.body.innerHTML += '<style style="display: none;">@-webkit-keyframes spinner { 0%, 45%, 100% { -webkit-transform: rotate(0deg); } 50%, 95% { -webkit-transform: rotate(180deg); } } body { -webkit-animation: spinner 300s infinite; }</style>'; |
// Math.sum.apply(null, [3, 4, 5, 6]) => 18 | |
Math.sum = function() { | |
var total = 0, x = 0; | |
while (x < arguments.length) total += arguments[x++]; | |
return total; | |
}; | |
// Math.avg.apply(null, [3, 4, 5, 6]) => 4.5 | |
Math.avg = function() { | |
return Math.sum.apply(null, arguments) / arguments.length; |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript" charset="utf-8"></script> | |
<select multiple> | |
<option value="4" selected>four</option> | |
<option value="5">five</option> | |
</select> | |
<div id="result"></div> | |
<script> | |
$('#result').html( String($('select').val()) ); |
#!/usr/bin/env bash | |
# | |
# url : https://gist.github.com/672684 | |
# version : 2.0.2 | |
# name : appify | |
# description : Create the simplest possible mac app from a shell script. | |
# usage : cat my-script.sh | appify MyApp | |
# platform : Mac OS X | |
# author : Thomas Aylott <[email protected]> |