The only cross-platform browser that fits in a Gist!
One line install. Works on Linux, MacOSX and Windows.
$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
package main | |
import ( | |
"code.google.com/p/gcfg" | |
"fmt" | |
r "github.com/dancannon/gorethink" | |
irc "github.com/fluffle/goirc/client" | |
"log" | |
"strings" | |
) |
// FIXME: use %PROGRAMFILES% to get at "c:\\Program\ Files" | |
// FIXME: put SAVE_DIR on the current user's desktop? | |
// FIXME: make it configurable via command-line options? | |
var BROWSERS = { | |
'ff' : { | |
'PATH' : "c:\\Program\ Files\\Mozilla\ Firefox\\", | |
'SAVE_DIR' : ".\\firefox\\" | |
}, | |
'ie' : { | |
'PATH' : "", |
<?php defined('SYSPATH') or die('No direct access allowed.'); | |
/** | |
* | |
* @author skowron-line | |
*/ | |
class DB extends Kohana_DB { | |
public static $_cache_driver = 'file'; | |
public static $_log_query = false; | |
private static $_transaction = false; |
#!/bin/bash | |
MAJOR_VERSION=$1 | |
MINOR_VERSION=$2 | |
if [ $# -lt 2 ] | |
then | |
echo "Usage: $0 <MAJOR-VERSION> <MINOR-VERSION>" | |
exit | |
fi |
upstream myapp { | |
server 127.0.0.1:8081; | |
} | |
limit_req_zone $binary_remote_addr zone=login:10m rate=1r/s; | |
server { | |
listen 443 ssl spdy; | |
server_name _; | |
# | |
# Slightly tighter CORS config for nginx | |
# | |
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
# | |
# Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
# don't seem to play nicely with this. | |
# |
local jid_bare = require "util.jid".bare; | |
local os_time = os.time; | |
local t_concat = table.concat; | |
local smtp = require "socket.smtp"; | |
local vcards = module:open_store("vcard"); | |
local smtp_server = module:get_option_string("smtp_server", "localhost"); | |
local smtp_user = module:get_option_string("smtp_username"); | |
local smtp_pass = module:get_option_string("smtp_password"); | |
local smtp_daemon = module:get_option_string("smtp_daemon"); |
func EncodeStreamingVideo(streamingFile io.Reader, request ShouldCanceler) (*os.File, error) { | |
outputFilename := generateFilename("mp4") | |
// Actually start the command. | |
cmd := exec.Command("ffmpeg", | |
// Read input from stdin. | |
"-i", "-", | |
// ... environment-specific ffmpeg options ... | |
"-y", outputFilename) |
Prerequisites:
Software components used: