Please see dotfiles/s3up.py
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
# | |
# Initialize the stuff | |
# | |
# We build the status bar item menu | |
def setupMenu | |
menu = NSMenu.new | |
menu.initWithTitle 'FooApp' | |
mi = NSMenuItem.new | |
mi.title = 'Hellow from MacRuby!' | |
mi.action = 'sayHello:' |
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
// See comments below. | |
// This code sample and justification brought to you by | |
// Isaac Z. Schlueter, aka isaacs | |
// standard style | |
var a = "ape", | |
b = "bat", | |
c = "cat", | |
d = "dog", |
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
framework 'AppKit' | |
class AppDelegate | |
def applicationDidFinishLaunching(notification) | |
voice_type = "com.apple.speech.synthesis.voice.GoodNews" | |
@voice = NSSpeechSynthesizer.alloc.initWithVoice(voice_type) | |
end | |
def windowWillClose(notification) | |
puts "Bye!" |
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
This gist contains two files for simple indexing of PDF files. | |
== requirements == | |
First you need to install Solr (which requires a Java JDK): Download a tar or zipfile at http://www.apache.org/dyn/closer.cgi/lucene/solr/ and unpack it to a directory of your choice. Go into this directory and start solr running in jetty by: | |
$ cd example | |
$ java -jar start.jar | |
Then locate your browser to http://localhost:8983/solr/ |
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
/* small demo for handlebars.js, jQuery, require.js */ | |
/*global Handlebars */ | |
var cart = { | |
products: [ | |
], | |
total: function() { | |
var sum = 0; | |
for(var i in this.products) { | |
sum += this.products[i].price; |
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
var sys = require('sys'), | |
http = require('http'), | |
static = require('node-static'), | |
journey = require('journey'); | |
exports.createRouter = function () { | |
return new (journey.Router)(function (map) { | |
// | |
// Version Binding |
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
/** | |
* Extracted from: https://github.com/beedesk/jQTouch/commit/b5d2fc63fe15acba15c4e8eaafc0e128997f8484 | |
*/ | |
/* ============= from themes/apple/theme.css ============= */ | |
#jqt > * { | |
-webkit-transform: translate3d(0,0,0); | |
-webkit-backface-visibility: hidden; | |
background: rgb(197,204,211) url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAABCAIAAACdaSOZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpiPHrmCgMC/GNjYwNSAAEGADdNA3dnzPlQAAAAAElFTkSuQmCC); | |
-webkit-user-select: ignore; |
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> | |
<script> | |
// Fired when a URL is visited, providing the HistoryItem data for that URL. | |
chrome.history.onVisited.addListener(function(historyItem) { | |
// Deletes all items from the history. | |
chrome.history.deleteAll(function() {}); | |
}); | |
</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
var xmpp = require('node-xmpp'), | |
secret = require('./secret'), | |
util = require('util'); | |
var creds = { | |
jid: '[email protected]', | |
password: secret.pw, //string | |
}; | |
var GChat = function(creds) { |
OlderNewer