Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
ja: | |
admin: | |
js: | |
true: True | |
false: False | |
is_present: 存在する | |
is_blank: 空白 | |
date: 日付 ... | |
between_and_: ... から ... | |
today: 今日 |
# Don't forget to run this vagrant command first | |
# vagrant ssh-config >> ~/.ssh/config | |
set :user, 'vagrant' | |
set :run_method, :sudo | |
role :app, '33.33.33.10' | |
ssh_options[:keys] = `vagrant ssh_config | grep IdentityFile`.split.last |
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" ]; then cat <<EOF | |
appify v3.0.0 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |
Key was generated using: | |
tom% openssl genrsa -des3 -out example.com.key 2048 | |
Generating RSA private key, 2048 bit long modulus | |
....+++ | |
..........................................................................................................................+++ | |
e is 65537 (0x10001) | |
Enter pass phrase for example.com.key: | |
Verifying - Enter pass phrase for example.com.key: | |
%tom |
#SSHと権限の設定 http://d.hatena.ne.jp/rubellum/20100901/1283321253 に従って、SSHの設定とrootログインの禁止をする。
##sudo
Default env_keep+="PATH"
この一文を/etc/sudoersに入れると、sudo時に現在のPATHが引き継がれる。
<?php | |
class ExampleDbTest extends PHPUnit_Extensions_Database_TestCase { | |
protected $conn = null; | |
/** | |
* (non-PHPdoc) | |
* @see PHPUnit_Extensions_Database_TestCase::setUp() | |
*/ | |
public function setUp() { |
# RTMPEのtype9 handshakeに対応している必要があるのでRTMPDump v2.4必須 | |
# CentOS5 32bitのさくらVPS、OSX Lionで動作確認。(OSX LionではRTMPDumpを32bitでビルド) | |
# ラジオ第1 | |
rtmpdump --rtmp "rtmpe://netradio-r1-flash.nhk.jp" \ | |
--playpath 'NetRadio_R1_flash@63346' \ | |
--app "live" \ | |
-W http://www3.nhk.or.jp/netradio/files/swf/rtmpe.swf \ | |
--live \ | |
-o r1.m4a |
#! /bin/sh | |
# ================================================================== | |
# ______ __ _____ | |
# /_ __/___ ____ ___ _________ _/ /_ /__ / | |
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / / | |
# / / / /_/ / / / / / / /__/ /_/ / /_ / / | |
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/ | |
# Multi-instance Apache Tomcat installation with a focus | |
# on best-practices as defined by Apache, SpringSource, and MuleSoft |