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
| // early experiments with node had mysterious double requests | |
| // turned out these were for the stoopid favicon | |
| // here's how to short-circuit those requests | |
| // and stop seeing 404 errors in your client console | |
| var http = require('http'); | |
| http.createServer(function (q, r) { | |
| // control for favicon |
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
| <?php | |
| // Download the latest version of TwitterOAuth from http://github.com/abraham/twitteroauth/downloads | |
| // Unpack the download and place the twitteroauth.php and OAuth.php files in the same directory as this file. | |
| // Register an application at http://dev.twitter.com/apps and from your new apps page get "my access token". | |
| require_once('twitteroauth.php'); | |
| $connection = new TwitterOAuth('app consumer key', 'app consumer secret', 'my access token', 'my access token secret'); | |
| $connection->post('statuses/update', array('status' => 'text to be tweeted')); |
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
| @echo off | |
| rem ============================== | |
| rem test for user input | |
| rem ============================== | |
| if [%1]==[] goto error | |
| if [%2]==[] goto error | |
| rem ============================== | |
| rem set password and user name | |
| rem ============================== | |
| set user=%1 |
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
| require 'net/http' | |
| require 'uri' | |
| # /api/v1/:format/new | |
| # /api/v1/:format/gists/:user | |
| # /api/v1/:format/:gist_id | |
| res = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/xml/new'), | |
| { 'files[file1.ab]' => 'CONTNETS', | |
| 'files[file2.ab]' => 'contents' }) |
NewerOlder