Skip to content

Instantly share code, notes, and snippets.

@nyaocat
nyaocat / qcc
Last active January 14, 2016 22:53
#!/usr/bin/env bash
#
# インストール:
# このファイル自体を PATH のある場所に保存して chmod +x すれば OK
# 例:
# sudo sh -c "curl http://nyaocat.jp/misc/qcc > /usr/local/bin/qcc"
# sudo chmod +x /usr/local/bin/qcc
# qcc -h
#
# 動作環境:
#!/usr/local/bin/bash
export PATH=/home/nyaocat/bin:/usr/local/bin/:$PATH
export LANG=ja_JP.utf-8
if [ $HTTP_HOST$REQUEST_URI != kenkov.nyaocat.jp/ ]
then
echo "Location: http://kenkov.nyaocat.jp/"
echo
@nyaocat
nyaocat / readonly.lua
Last active October 20, 2018 15:49
Lua Read Only Table (or Userdata) module http://nyaocat.hatenablog.jp/entry/2013/11/09/111856
--[[
lua readonly module
2013 (c) nyaocat
this program is licensed under NYSL( http://www.kmonos.net/nysl/ )
lua5.1 and lua5.2
]]
local newproxy = newproxy or require("newproxy") -- for Lua5.2
local type, getmetatable, pairs, assert, error = type, getmetatable, pairs, assert, error