Skip to content

Instantly share code, notes, and snippets.

View dataich's full-sized avatar
😀

Taichiro Yoshida dataich

😀
View GitHub Profile
{
"repositories": {
"packagist": false,
"phpunit de": {
"pear": {
"url": "http://pear.phpunit.de"
}
},
"symfony-project com": {
"pear": {
[package]
name = onion_sample
desc = onion_sample description
version = 1.0.0
author = Taichiro Yoshida <[email protected]>
[require]
pear.phpunit.de/PHPUnit = '> 3.6.6'
@dataich
dataich / onion.rb
Created January 11, 2012 11:48
Formula for Onion
require 'formula'
class Onion < Formula
head 'https://github.com/c9s/Onion/raw/master/onion'
homepage 'https://github.com/c9s/Onion'
def install
system "chmod a+x onion"
system "mkdir -p #{prefix}/bin"
system "cp onion #{prefix}/bin"
@dataich
dataich / gist:1526690
Created December 28, 2011 06:19
WordPress Interactive Shell
# On WordPress root directory
php -a
php > require('./wp-blog-header.php');
php > ob_end_clean();
@dataich
dataich / postinstall
Created August 2, 2011 03:52
postinstall
#!/bin/sh
if [ -d ~/data/wp-content ]
then
rm -rf ~/current/wp-content
else
mkdir -p ~/data
mv ~/current/wp-content ~/data/wp-content
fi
ln -s ~/data/wp-content ~/current/wp-content
@dataich
dataich / nginx.conf
Created August 2, 2011 03:51
nginx.conf
try_files $uri $uri/ /index.php;
@dataich
dataich / wp-config.php
Created August 2, 2011 03:50
wp-config.php
$envfilepath = '/home/dotcloud/environment.json';
$environment = json_decode(file_get_contents($envfilepath),true);
define('DB_NAME', 'wordpress');
define('DB_USER', $environment['DOTCLOUD_DATA_MYSQL_LOGIN']);
define('DB_PASSWORD', $environment['DOTCLOUD_DATA_MYSQL_PASSWORD']);
define('DB_HOST', $environment['DOTCLOUD_DATA_MYSQL_HOST'] . ':' . $environment['DOTCLOUD_DATA_MYSQL_PORT']);
@dataich
dataich / dotcloud.yml
Created August 2, 2011 03:47
dotcloud.yml
www:
type: php
approot: www
data:
type: mysql
@dataich
dataich / gist:950534
Created May 1, 2011 14:25
open url with non-default application
NSURL *url = [NSURL URLWithString:@"http://www.example.com/"];
[[NSWorkspace sharedWorkspace] openURLs:[NSArray arrayWithObject:url]
withAppBundleIdentifier:@"com.apple.Safari" //取得したidentifierを渡してやる
options:NSWorkspaceLaunchDefault
additionalEventParamDescriptor:nil
launchIdentifiers:nil];
@dataich
dataich / gist:950533
Created May 1, 2011 14:24
open url with default application
NSURL *url = [NSURL URLWithString:@"http://www.example.com/"];
[[NSWorkspace sharedWorkspace] openURL:url];