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
on linkinuscmd(userName) | |
set vals to "This is a spam script output | |
" | |
repeat with i from 1 to 15 | |
set vals to vals & "/slap " & userName & " | |
" | |
end repeat | |
return vals | |
end linkinuscmd |
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
on linkinuscmd(cmd) set AppleScript's text item delimiters to "" tell application "System Events" to if (name of processes) does not contain "iTunes" then return "/me is not currently running iTunes." tell application "iTunes" to if player state is playing then set theTrack to "\"" & name of current track & "\"" if theTrack is "\"\"" then set theTrack to "" set theArtist to " by " & artist of current track if theArtist is " by " then set theArtist to "" set theAlbum to " á Album: " & album of current track if theAlbum is " á Album: " then set theAlbum to "" set theBitrate to " á " & bit rate of current track & "kbps" if theBitrate is " á kbps" then set theBitrate to "" set theKind to " " & kind of current track if theKind contains " MPEG " then set theKind to " MP3" if theKind is " " then set theKind to "" set theStream to " streaming \"" & current stream title & "\"" if theStream is " streaming \"" & missing value & "\"" then set theStream to "" set theRating to rating of cu |
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.post('#/reply', function (context) { | |
var fields = this.params, doc = {}; | |
doc.content = fields['post']; | |
doc.datetime = new Date.now(); | |
doc.thread_id = fields['thread_id']; | |
doc.type = 'post'; | |
doc.user_id = 'chapel'; | |
console.log(doc); | |
db.saveDoc(doc, { | |
success: function() { |
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
(function($) { | |
var app = $.sammy('#content', function() { | |
var db = $.couch.db('modern-forum'); | |
//this.use('Couch'); | |
this.helpers({ | |
refreshThreads: function() { | |
db.view('modern-forum/threads', { | |
success: function(threads) { | |
threads.rows.forEach(function(thread) { |
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"), | |
url = require("url"), | |
querystring = require("querystring"); | |
var apiPort = process.ARGV[2] || 8080; | |
var apiKey = 'YOUR KEY HERE'; | |
http.createServer(function(req, res) { | |
var jsonp = 'jsonp'; |
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
function(){} |
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
function(){}; |
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 req = http.request({ | |
host: '127.0.0.1', | |
port: '5984', | |
path: '/ms/', | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json' // Need to add headers object | |
}}, function(res){ | |
var sigma = ''; | |
res.on('data',function(chunk){sigma+=chunk}) |
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
opt.user = opt.user or opt.u | |
opt.token = opt.token or opt.t | |
opt.out = opt.out or opt.o |
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
spit_error = (err) -> | |
console.error "#{err}\nFor more help see: ngist -h" | |
process.exit 1 |