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 | |
set -eu | |
nowdate=`date "+%Y/%m/%d %T"` | |
host=`hostname -f` | |
echo -e '!!start git pull carnival!!' | ./slack.sh | |
find /var/www/html -mindepth 1 -maxdepth 1 -type d | while read FILE |
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
function doPost(e) { | |
var ss = SpreadsheetApp.openById("###_API_TOKEN_###"); | |
var sheet = ss.getSheetByName("シート名"); | |
//formデータを取り出して、配列に格納 | |
var array = [e.parameters.timestamp[0],e.parameters.hostname[0],e.parameters.plan[0],e.parameters.uri[0]]; | |
//一発で最終行に書込みする | |
sheet.appendRow(array); | |
} |
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
var gulp = require('gulp'); | |
var plumber = require('gulp-plumber'); | |
var jade = require('gulp-jade'); | |
var data = require('gulp-data'); | |
// Jade compile to html | |
gulp.task( 'jade', function() { | |
gulp.src( './src/jade/*.jade' ) | |
.pipe( data( function (file) { | |
return { 'meta': require('./src/jade/meta.json')}; |
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
<?php | |
/* | |
Template Name: mail from slack | |
これは、WordPressテーマ上で動作させることを前提としていて、 | |
専用に1こ固定ページをつくり、このテンプレートを読み込ませ、 | |
その固定ページのURIでslack apiと連携させ動作させる | |
あと、tokenは slack api outbound webhooksで設定したのをいれる | |
送信先アドレスで、headersにいれてあるfromのアドレスを許可するように | |
↑Google groupsなど | |
*/ |
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
"type": "privileged", | |
"permissions": { | |
"tcp-socket": { | |
"description": "connect to IRC servers." | |
} | |
}, |
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
{ | |
"private_key_id": "################", | |
"private_key": "-----BEGIN PRIVATE KEY-----\#####################################################################################################-----END PRIVATE KEY-----\n", | |
"client_email": "########@developer.gserviceaccount.com", | |
"client_id": "#########gsa.apps.googleusercontent.com", | |
"type": "service_account" | |
} |
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 |
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
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
$ git clone git@github.com:ryanxcharles/fullnode.git | |
$ cd fullnode | |
$ npm install | |
$ gulp | |
$ chmod 777 bin/testapp.js | |
$ ./bin/testapp.js |
OlderNewer