This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ diskutil eraseVolume "Free Space" dummy disk0s1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat <<__EOC__ | |
OpenVPN install script for Serversman@VPS | |
__EOC__ | |
# 実行時に指定された引数の数、つまり変数 $# の値が 2 でなければエラー終了。 | |
if [ $# -ne 2 ]; then | |
echo "引数がたりません" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST -H "Content-Type: application/json" https://sheetsu.com/apis/v1.0/ENDPOINT -d '{ "rows": [{"TimeStamp":"2016/9/27 1:23","undefined":"fuga"}, {"TimeStamp":"2016/9/28 2:34","undefined":"moga"}] }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# each entries | |
entries = objects | |
$.each entries, ( i, entry ) -> | |
setTimeout () -> | |
console.log 'say '+i | |
, 500*i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 【GAS】住所から緯度経度を取得する | |
function getLocation(address) { | |
var requestUrl = "https://maps.googleapis.com/maps/api/geocode/json?address=" + address; // Google Geocoding API | |
var result = JSON.parse( UrlFetchApp.fetch(requestUrl) ); | |
if ( result['status'] === 'ZERO_RESULTS' ) { return 'No Result.' } | |
var location = result['results'][0]['geometry']['location']; | |
return location['lat'] +','+ location['lng']; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone git@github.com:ryanxcharles/fullnode.git | |
$ cd fullnode | |
$ npm install | |
$ gulp | |
$ chmod 777 bin/testapp.js | |
$ ./bin/testapp.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'riot_js-rails' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sheet_id = '#########'; | |
$request = new Google_Http_Request( | |
"https://spreadsheets.google.com/feeds/worksheets/{$sheet_id}/private/full?alt=json", | |
"GET", | |
array( | |
"Authorization" => "Bearer {$this->token}", | |
"GData-Version" => "3.0" | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//$objects = 10個ぐらいで、 | |
//$objects->name = 'unko' は3個としよう | |
$push = new ArrayObject(); | |
foreach( $objects as $object ){ | |
if( $object->name == 'unko' ){ | |
$push->append( $object ); | |
} | |
} | |
count($push); // -> 3 |
NewerOlder