This file contains hidden or 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 StatusBarView < NSView | |
attr_reader :progressIndicator, :statusBarItem | |
def initWithStatusBarItem(item) | |
bar = item.statusBar | |
if initWithFrame([[0,0], [bar.thickness, bar.thickness]]) | |
@statusBarItem = item | |
@highlight = false | |
origin, size = frame.origin, frame.size |
This file contains hidden or 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> | |
<html> | |
<head> | |
<!-- | |
A simple example of PIN-based oauth flow with Twitter and jsOAuth. | |
This is mostly based on/copied from <http://log.coffeesounds.com/oauth-and-pin-based-authorization-in-javascri>. | |
Get jsOAuth at <https://github.com/bytespider/jsOAuth/downloads> |
This file contains hidden or 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
:+1: | |
:-1: | |
:airplane: | |
:art: | |
:bear: | |
:beer: | |
:bike: | |
:bomb: | |
:book: | |
:bulb: |
This file contains hidden or 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
// mkdir indextank | |
// wget https://github.com/SPORE/api-description/blob/master/services/indextank.json | |
// install node and npm | |
// npm install spore underscore futures | |
// edit baseUrl, password and index var | |
// node indextank.js | |
var baseUrl = 'http://xxx.api.indextank.com'; | |
var password = 'xxx'; | |
var index = 'test_spore'; |
This file contains hidden or 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> | |
<html> | |
<head> | |
<title>IndexDB Demo - Version 1.1</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<meta name="author" content="Ido Green"/> | |
</head> | |
<style> | |
#footer { | |
background-color: yellowgreen; |
This file contains hidden or 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
Handlebars.registerHelper 'each_with_index', (array, fn) -> | |
buffer = '' | |
for i in array | |
item = i | |
item.index = _i | |
buffer += fn(item) | |
buffer |
This file contains hidden or 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
/* | |
* Author: David Bamber <[email protected]> | |
* http://bmbr.co | |
* | |
* Usage: node test.js -u <googleuser> -p <googlepass> | |
* node test.js -u <googleuser> -p <googlepass> -regex -url /feeds/default/private/full | |
* | |
* Optional Fags: | |
* -url [url]: requests a different uri from docs api, defaults to /feeds/default/private/full/-/table | |
* -regex: applies a regex to try and sanitize output |
This file contains hidden or 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
javascript:void(window.open("","dp_debugger","width=600,height=600,location=0,menubar=0,status=1,toolbar=0,resizable=1,scrollbars=1").document.write("<script language=\"JavaScript\" id=dbg src=\"http://www.digitalpulse.omniture.com/dp/debugger.js\"></"+"script>")); |
This file contains hidden or 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
/** | |
Big thanks to Derick Bailey for his post here: | |
http://lostechies.com/derickbailey/2011/09/15/zombies-run-managing-page-transitions-in-backbone-apps/ | |
*/ | |
(function(Account) { | |
/** LOTS OF MODEL, COLLECTION, AND VIEW CREATION GOING ON UP HERE, LEFT IT OUT FOR SIMPLICITY */ | |
/** | |
* Define Routing. |
This file contains hidden or 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
# Here a few bash one-liners that helped me analyze / fight a weak DOS attack against debuggable.com. Mostly for future reference. | |
# The attacker was opening lots of tcp connections without sending data, I believe it's called a SYN flood, see: http://tools.ietf.org/html/rfc4987#section-3.2 | |
# Step 0: Check what is going on at port 80 | |
$ netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c | |
# Step 1: Increase the number of available fds | |
$ ulimit -n 32000 | |
# Step 2: Restart your webserver, for me: |