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 "rubygems" | |
| require "java" | |
| require "jdbc/mysql" | |
| require 'RedCloth' | |
| require 'net/http' | |
| require 'uri' | |
| PosterousUsername = '' | |
| PosterousPassword = '' |
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
| /* fib.js */ | |
| i = 2; | |
| while(true) { | |
| postMessage(i + " " + fib(i)); | |
| i++; | |
| } | |
| function fib(n){ | |
| return n < 2 ? n : fib(n-1) +fib(n-2); | |
| } |
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
| Hello from Gist! |
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 'rubygems' | |
| require 'open-uri' | |
| require 'xmlrpc/client' | |
| WordPressSite = "http://SITE.wordpress.com" | |
| WordPressUsername = 'username' | |
| WordPressPassword = 'password' | |
| PosterousApi = 'http://posterous.com/api' | |
| PosterousEmail = 'email' |
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
| #!/usr/bin/env ruby | |
| # flickrup.rb - A utility to upload photos to Flickr. | |
| # | |
| # This work is put in public domain by Kesava Abhinav Yerra. | |
| # | |
| # Create a config file ~/.flickrup and add your Flickr API Key and secret key | |
| # For example: | |
| # | |
| # secret: SECRET_KEY |
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
| def post_multipart url, params | |
| req = params.collect do |k,v| | |
| "-F #{k}=#{v.kind_of?(File) ? '@' : ''}'#{v.kind_of?(File) ? v.path : v}'" | |
| end.join(' ') | |
| `curl -s #{req} #{url}` | |
| end |
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
| /* | |
| * <events> | |
| * <event> | |
| * <name>My name</name> | |
| * </event> | |
| * </events> | |
| */ | |
| #import <libxml/xmlmemory.h> | |
| #import <libxml/parser.h> |
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
| set :application, "abooklog" | |
| set :repository, "ssh://[email protected]/repo_location" | |
| set :user, 'deployer' | |
| # If you have previously been relying upon the code to start, stop | |
| # and restart your mongrel application, or if you rely on the database | |
| # migration code, please uncomment the lines you require below | |
| # If you are deploying a rails app you probably need these: |
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
| python << EOF | |
| # Post to Blog | |
| import vim | |
| import urllib2, urllib | |
| import base64 | |
| import markdown2 | |
| blog_email = '[email protected]' | |
| blog_password = 'mYpA$$W0RD' | |
| site_id = "123456" |
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
| #!/usr/bin/env ruby | |
| # sudo gem install rick-linode | |
| require 'rubygems' | |
| require 'open-uri' | |
| require 'linode' | |
| LinodeAPIKey = '<LINODE_API_KEY_HERE>' | |
| DomainID = '<DOMAIN_ID>' | |
| ResourceID = '<RESOURCE_ID>' |