Skip to content

Instantly share code, notes, and snippets.

View chapel's full-sized avatar

Jacob Chapel chapel

View GitHub Profile
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
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.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() {
(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) {
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';
function(){}
function(){};
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})
opt.user = opt.user or opt.u
opt.token = opt.token or opt.t
opt.out = opt.out or opt.o
spit_error = (err) ->
console.error "#{err}\nFor more help see: ngist -h"
process.exit 1