Skip to content

Instantly share code, notes, and snippets.

@chrismdp
chrismdp / s3.sh
Last active January 23, 2025 09:26
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@moznion
moznion / cpanize_minil.md
Last active August 29, 2015 14:07
Minilla使ってCPANにブツを上げる

ホームディレクトリに.pauseというファイルを作る

$ vi ~/.pause

以下のように書く

user USER_NAME
@edvakf
edvakf / main.go
Created September 26, 2014 12:20
gob serialize
package main
import (
"bytes"
"database/sql"
"encoding/gob"
"log"
Radix "github.com/fzzy/radix/extra/pool"
)
@geta6
geta6 / _秘伝のたれ.sh
Created March 27, 2014 14:19
cronで回すと$TARGET内にある`.mp4` で終わらないファイルを自動でエンコードします
#!/bin/zsh
USER='nouser'
GROUP='nogroup'
TARGET='require to set'
function source
{
find $TARGET -type f \( ! -iname '.*' \) | sed -E 's/ */ /g' | grep -vE 'mp4$' | sort -t'/' -k 5nr -k 6n
}
@edvakf
edvakf / README.md
Last active December 22, 2015 08:29
PHPコードの複雑さチェック

complexity.php

使い方

php complexity.php filename

出力形式

@nebiros
nebiros / Gemfile
Created May 23, 2012 15:58
rails + unicorn + rbenv + init.d daemon
group :production do
gem "unicorn"
end
@doches
doches / reference.lua
Created March 27, 2012 19:47
Lua Cheat Sheet
-- Lua Cheat Sheet for Programmers, by Al Sweigart http://coffeeghost.net
-- This cheat sheet is an executable Lua program.
--[[ This is
a multline comment]]
---[[ This is a neat trick. The first -- makes -[[ not a multiline comment.
print("This line executes.")
--]] The rest of this line is also a comment.
print("Here is a string" .. ' concatenated with ' .. 2 .. ' other strings.')
@caseyohara
caseyohara / reserved_usernames.rb
Created December 9, 2011 22:58
A list of reserved usernames to avoid vanity URL collision with resource paths
# A list of possible usernames to reserve to avoid
# vanity URL collision with resource paths
# It is a merged list of the recommendations from this Quora discussion:
# http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features
# Country TLDs found here:
# http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
# Languages found here: