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 httpAgent = require('http-agent'), | |
| jsdom = require('jsdom'), | |
| url = require('url'), | |
| sys = require('sys'); | |
| exports.start = function () { | |
| var agent = httpAgent.create('www.bungie.net', ['/stats/reach/playergamehistory.aspx?player=thechapel&vc=2']); | |
| agent.addListener('next', function (err, agent) { |
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 data = querystring.stringify({'file_ext[gistfile1]': opt.ext, 'file_name[gistfile1]': opt.file, 'file_contents[gistfile1]': contents }) | |
| var request = client.request('POST', '/gists', { | |
| 'Host': 'gist.github.com', | |
| 'Content-Type': 'application/x-www-form-urlencoded', | |
| 'Content-Length': data.length | |
| }) | |
| request.end(data) |
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
| {{"ActionScript", ".as"},{"C", ".c"},{"Csharp", ".cs"},{"Common_Lisp", ".cl"},{"emacs_lisp", ".sls"},{"erlang", ".hrl"},{"haskell", ".hs"},{"html", ".html"},{"java", ".java"},{"lua", ".lua"},{"objective_c", ".m"},{"perl", ".pl"},{"Scala", ".scala"},{"scheme", ".sls"},{"TeX", ".tex"},{"XML", ".xml"},{"Ada", ".adb"},{"AppleScript", ".scpt"},{"Arc", ".arc"},{"ASP", ".ascx"},{"Assembly", ".asm"},{"Batchfile", ".bat"},{"Befunge", ".befunge"},{"Boo", ".boo"},{"Brainfuck", ".b"},{"C_ObjDump", ".c-objdump"},{"ChucK", ".java"},{"Clojure", ".clj"},{"CoffeeScript", ".coffee"},{"ColdFusion", ".cfm"},{"Cpp_ObjDump", ".cppobjdump"},{"Cucumber", ".feature"},{"D", ".d"},{"D_ObjDump", ".d -objdump"},{"Darcs_Patch", ".darcspatch"},{"Delphi", ".pas"},{"Duby", ".rb"},{"Dylan", ".dylan"},{"Eiffel", ".e"},{"Fsharp", ".fs"},{"Factor", ".factor"},{"FORTRAN", ".f"},{"GAS", ".s"},{"Genshi", ".kid"},{"Gentoo_Ebuild", ".sh"},{"Gentoo_Eclass", ".sh"},{"Gettext_Catalog", ".po"},{"Go", ".go"},{"Groff", ".man"},{"Groovy", ".groovy"},{"Haml" |
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
| -- -------------------------------------- -- Gist Script for Linkinus -- by Jacob Chapel -- Version 0.5 -- -------------------------------------- on linkinuscmd(paste_type) set useGrowl to do shell script "defaults read com.conceitedsoftware.Linkinus alertGrowl" set theURL to "" set file_type to ".txt" set file_types to {{"ActionScript", ".as"}, {"C", ".c"}, {"Csharp", ".cs"}, {"Common_Lisp", ".cl"}, {"emacs_lisp", ".sls"}, {"erlang", ".hrl"}, {"haskell", ".hs"}, {"html", ".html"}, {"java", ".java"}, {"lua", ".lua"}, {"objective_c", ".m"}, {"perl", ".pl"}, {"Scala", ".scala"}, {"scheme", ".sls"}, {"TeX", ".tex"}, {"XML", ".xml"}, {"Ada", ".adb"}, {"AppleScript", ".scpt"}, {"Arc", ".arc"}, {"ASP", ".ascx"}, {"Assembly", ".asm"}, {"Batchfile", ".bat"}, {"Befunge", ".befunge"}, {"Boo", ".boo"}, {"Brainfuck", ".b"}, {"C_ObjDump", ".c-objdump"}, {"ChucK", ".java"}, {"Clojure", ".clj"}, {"CoffeeScript", ".coffee"}, {"ColdFusion", ".cfm"}, {"Cpp_ObjDump", ".cppobjdump"}, {"Cucumber", ".feature"}, {"D", ".d"}, |
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
| 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
| 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
| var http = require('http'); | |
| var querystring = require('querystring'); | |
| var data = { | |
| message: 'Hello' | |
| }; | |
| var form_data = querystring.stringify(data); | |
| var options = { |
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
| exports.exec = (options, callback) -> | |
| # Load image | |
| fs.readFile './image.jpg', (err, img) -> | |
| if err | |
| return callback(err, null); | |
| # POST image to imgur | |
| request { | |
| method: 'POST', | |
| body: "image=" + img.toString() + "&key=42e1c4982b52fabcae9033ff428d5175", | |
| uri: 'http://imgur.com/api/upload.json', |
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
| /*=========================================================================== | |
| SETTINGS | |
| ============================================================================= */ | |
| var port = 3000, | |
| cacheAge = 60000 * 60 * 24 * 365, | |
| logs = { | |
| set: false, | |
| string: '\\n ' + ':date'.bold.underline + '\\n\\n' + ' IP: '.cyan.bold | |
| + ' ' + ':remote-addr'.white + '\\n' + ' Method: '.red.bold |
OlderNewer