Skip to content

Instantly share code, notes, and snippets.

View codesoda's full-sized avatar

Chris Raethke codesoda

View GitHub Profile
@yowu
yowu / HttpProxy.go
Last active April 27, 2024 20:17
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
@protrolium
protrolium / ffmpeg.md
Last active May 15, 2024 18:27
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@pcreux
pcreux / Gemfile
Last active December 11, 2023 20:24
Fast Rails + Heroku Configuration
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
@jwaldrip
jwaldrip / .railsrc
Last active December 17, 2015 02:48
A rails 3.2.x/4.x template, with GitHub integration.
--database=postgresql
--skip-test-unit
--skip-bundle
--template=https://gist.github.com/jwaldrip/5538342/raw/rails-template.rb
@ignacio
ignacio / example_server.lua
Created December 22, 2010 13:51
Route66 example server.
require "luanode.http"
local router = require "route66".new()
router:get("/prompt", function(req, res)
res:writeHead(200, { ["Content-Type"] = "text/plain"})
res:finish(">:")
end)
router:get("/hello/(.+)", function(req, res, user)
res:writeHead(200, { ["Content-Type"] = "text/plain"})
class UsersController < ApplicationController
include Clearance::App::Controllers::UsersController
# Override and add in a check for invitation code
def create
@user = User.new params[:user]
invite_code = params[:invite_code]
@invite = Invite.find_redeemable(invite_code)
if invite_code && @invite