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
// ==UserScript== | |
// @name test upload | |
// @namespace namespace | |
// @description description | |
// @include https://post.craigslist.org/* | |
// @version 1 | |
// @grant all | |
// ==/UserScript== | |
$ = unsafeWindow.jQuery; |
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 | |
$start = microtime(true); | |
$loops = 10000000; | |
$herpes = new stdClass; | |
for ($i = 0; $i < $loops; $i++) { | |
try { | |
$herpes->mouthsores = true; |
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
// linqpad example | |
void Main() | |
{ | |
Car.Go(); | |
Honda accord = new Honda("accord"); | |
Honda.Go(); // throws an error here - ref to non-static method | |
} | |
public class Car | |
{ |
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
alias ..="cd .." | |
alias st="git status" | |
alias flush='dscacheutil -flushcache && echo "cache flushed"' | |
alias bs='git cia "bs"' | |
alias df='git diff --color --color-words --abbrev' | |
alias restart='sudo apachectl -k restart && echo "apache restarted"' | |
alias tit=git | |
export CLICOLOR=1 | |
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx |
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
// C# | |
int totalrows = 1000; | |
int processed = 0; | |
while (processed < totalrows) | |
{ | |
processRow(); | |
// bug: infinite loop - we never increment processed var | |
} | |
// SqlClient |
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
/* image replacement in lieu of text-indent */ | |
.ir { | |
border: 0; | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
background-color: transparent; | |
} |
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
var global = { | |
// pub sub lifted from http://jsperf.com/pub-sub-implementations/13 | |
cache: {}, | |
publish: function(topic, args) { | |
var self = this; | |
if (self.cache[topic]) { | |
var currentCache = self.cache[topic], | |
currentArgs = args || []; |
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
<!DOCTYPE html> | |
<head> | |
<title>test</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script> | |
$(function() { | |
}); |