$ git branch -a の出力が画面に収まりますか?
branchでの作業が終わり、masterに取り込まれたら、branchを削除しましょう
$ git fetch origin
| #!/bin/sh | |
| do_start() | |
| { | |
| #このインスタンスのPublicIPアドレスをRDSのセキュリティグループに追加 | |
| PUBLICADDR=`curl http://169.254.169.254/latest/meta-data/public-ipv4 2> /dev/null` | |
| aws rds authorize-db-security-group-ingress --db-security-group-name SECURITY-GROUP-NAME --cidrip "${PUBLICADDR}/32" | |
| #このインスタンスをELB配下に置く | |
| INSTANCEID=`curl http://169.254.169.254/latest/meta-data/instance-id 2> /dev/null` |
| #!/bin/sh | |
| GITIGNOREPATH=`git rev-parse --show-toplevel`'/.gitignore' | |
| if [ $? -ne 0 ] | |
| then | |
| exit $? | |
| fi | |
| if [ ! -f $GITIGNOREPATH ] |
| ## STEP0. はじめに | |
| http://www.nicovideo.jp/watch/1380872606 | |
| 上記の動画を例にDL方法を解説する | |
| ## STEP1. パラメータの取得 | |
| http://flapi.nicovideo.jp/api/getflv/1380872606 | |
| 上記URLをログインした状態(Cookieが設定されている状態)でGETする |
| #!/bin/sh | |
| USERID=`id | sed 's/uid=\([0-9]*\)(.*/\1/'` | |
| if [ $USERID -ne 0 ] | |
| then | |
| echo $0": Error: You must be root to do that!" | |
| exit 1 | |
| fi | |
| echo "\ntrash:\t/dev/null" >> /etc/aliases |
| #!/bin/sh | |
| BUCKUPREMOTENAME='AnotherRemoteName' | |
| BRANCHNAME=`git rev-parse --abbrev-ref HEAD` | |
| if test $BUCKUPREMOTENAME != $1 ; then | |
| git push $BUCKUPREMOTENAME $BRANCHNAME | |
| fi |
| <?php | |
| App::uses('CakeEmail', 'Network/Email'); | |
| class Base64Email extends CakeEmail { | |
| protected function _renderTemplates($content) { | |
| $rendered = parent::_renderTemplates($content); | |
| array_walk($rendered, function(&$val, $key) { | |
| $val = chunk_split(base64_encode($val), 76, "\n"); | |
| }); |
| <?php | |
| $apiKey = ''; | |
| $apiSecret = ''; | |
| if (isset($_GET['cert'])) { | |
| $apiSig = md5($apiSecret . 'api_key' . $apiKey . 'cert' . $_GET['cert']); | |
| $jsonString = file_get_contents("http://auth.hatena.ne.jp/api/auth.json?api_key={$apiKey}&cert={$_GET['cert']}&api_sig={$apiSig}"); | |
| $obj = json_decode($jsonString); | |
| if (!$obj->has_error) { | |
| echo file_get_contents("http://b.hatena.ne.jp/{$obj->user->name}/rss"); |
| // app/Config/database.php | |
| class DATABASE_CONFIG { | |
| public $default = array( | |
| 'datasource' => 'Database/Mysql', | |
| 'persistent' => false, | |
| 'host' => 'master.mysql.host', | |
| 'login' => 'mysql_username', | |
| 'password' => 'mysql_password', | |
| 'database' => 'schema_name', |
| #!/usr/bin/ruby | |
| # -*- coding: utf-8 -*- | |
| # configure | |
| API_VERNO = 1 | |
| API_TOKEN = '' | |
| KNKR_HOST = '' | |
| $header = { | |
| 'Referer' => "http://#{KNKR_HOST}/kcs/port.swf?version=1.3.7", |