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
dojo.provide("clubn.controller.CycleController"); | |
dojo.declare("clubn.controller.CycleController", mojo.controller.Controller, | |
{ | |
addObservers: function() { | |
this.addObserver(this, "onInit", "InitializeCycle", function(context, caller) { | |
return { | |
timeout: 6000 | |
}; | |
}); | |
}, |
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
#!/usr/bin/env ruby | |
$: << ENV['TM_SUPPORT_PATH'] + '/lib' | |
require 'escape' | |
def esc(str) | |
e_sn(str).gsub(/\}/, '\\}') # escaping inside a placeholder | |
end | |
s = STDIN.read | |
if s.empty? then | |
print "<strike>$1</strike>" |
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
function MyAddon:OnInitialize() | |
self.db = LibStub("AceDB-3.0"):New("NinjalistDB") | |
end |
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
table.insert(self.db.global, "my data goes here") |
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
for i,v in ipairs(self.db.global) do | |
print("Row: "..v) | |
end |
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
google.pacman || | |
function () { | |
var a = true, | |
e = false, | |
g = {}, | |
i = [1, 4, 2, 8], | |
l = { | |
0: { | |
axis: 0, | |
increment: 0 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
//assign an observer to the submit button of the ajax form | |
this.addObserver("#btn-submit", "onclick", "Submit"); | |
//only if we're passed validation, we show the overlay to display a request indicator | |
this.addObserver(this.getCommand("ValidateRules"), "onResponse", "ShowOverlay", { show: true }); | |
// | |
this.addObserver(this.getCommand("Submit"), "onComplete", "ShowOverlay", { show: false }); | |
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
// socket.io | |
var socket = io.listen(app); | |
var buffer = []; | |
socket.on('connection', function(client){ | |
client.send({ buffer: buffer }); | |
client.broadcast({ announcement: client.sessionId + ' connected' }); | |
client.on('message', function(message){ |
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 http = require('http'), | |
url = require('url'), | |
fs = require('fs'), | |
// io = require('../'), | |
io = require('socket.io'), | |
sys = require('sys'), | |
server = http.createServer(function(req, res){ | |
// your normal server code | |
var path = url.parse(req.url).pathname; |
OlderNewer