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 myFunction() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
for (var i in users.users){ | |
var user = users.users[i]; | |
var r= parseInt(i, 10)+2; | |
sheet.getRange(r, 1).setValue(user.screen_name); | |
sheet.getRange(r, 2).setValue(user.name); | |
sheet.getRange(r, 3).setValue(user.protected); | |
} |
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
<script type="text/javascript"> | |
// ランディングページのパスをCookieに記録し、URLを置換する | |
document.addEventListener('DOMContentLoaded', function(){ | |
var val = document.cookie.replace(/(?:(?:^|.*;\s*)sd_lp_path\s*\=\s*([^;]*).*$)|^.*$/, "$1"); | |
var new_val = "http://blog.whotwi.com" + document.location.pathname; | |
if (!val) { | |
document.cookie="sd_lp_path=" + new_val + "; path=/;max-age=36000"; | |
} | |
var utm_campaign = (val ? val + '__' + new_val : new_val); | |
var new_url = "https://social-dog.net/?utm_source=blog&utm_medium=web&utm_campaign=" + encodeURIComponent(utm_campaign); |
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/sh | |
DVAL=`/bin/df / | /usr/bin/tail -1 | /bin/sed 's/^.* \([0-9]*\)%.*$/\1/'` | |
if [ $DVAL -gt 80 ]; then | |
curl -s -S -X POST --data-urlencode "payload={\"channel\": \"alert\", \"username\": \"web.social-dog.net\", \"icon_emoji\": \":warning:\", \"text\": \"Disk Usage $DVAL%\" }" [webhook URL] >/dev/null | |
fi |
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
update | |
upgrade | |
tap homebrew/versions | |
# install homebrew-cask | |
tap phinze/homebrew-cask | |
install brew-cask | |
# install with homebrew |
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
# SOME DESCRIPTIVE TITLE. | |
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
# This file is distributed under the same license as the PACKAGE package. | |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
# | |
#, fuzzy | |
msgid "" | |
msgstr "" | |
"Project-Id-Version: PACKAGE VERSION\n" | |
"Report-Msgid-Bugs-To: \n" |
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 | |
$start=microtime()+time(); | |
define("COUNT_OF_PAGES",3); | |
$mh = curl_multi_init(); | |
$ch=array(); | |
$data=array(); | |
for($i=1;$i<=COUNT_OF_PAGES;$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
//ブログ | |
$cache_file_name="/tmp/index_blog"; | |
if(file_exists($cache_file_name) && time()-filemtime($cache_file_name)<43200 ){ | |
$blog=unserialize(file_get_contents($cache_file_name)); | |
}else{ | |
$data=simplexml_load_file("http://d.hatena.ne.jp/konisimple/searchdiary?word=%2A%5Bwhotwi%5D&mode=rss"); | |
$blog=array(); | |
foreach($data->item as $item){ | |
$blog[]=array( | |
"title"=>preg_replace("/\[(.+)\]/","",(String)$item->title), |
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
Sub go() | |
Dim cue_count As Integer | |
Dim eyerecord_count As Long | |
Dim cue_min(0 To 50) As Long | |
Dim cue_max(0 To 50) As Long | |
Dim eyerecord_val As Long | |
Dim tmp(0 To 10) As Integer | |
' Responseシート読み込み | |
Worksheets("Response").Activate | |
cue_count = 2 |
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
// 使い方 | |
// 検索結果ページで以下をアドレスバーにコピーアンドペースする。 | |
// javascript:(function(){d=document;s=d.createElement('script');s.setAttribute('src','https://gist.github.com/raw/775903/replacingCollection.js');d.documentElement.appendChild(s);}()) | |
document.body.appendChild((function(){ | |
var s = document.createElement("script"); | |
s.type = "text/javascript"; | |
s.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
s.onload = function() { | |
window.jQuery.noConflict(); |
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
第2回「東京六大学ハイク」を開催のお知らせ(締切迫る)【早稲田大学学生生活課】 | |
2010年10月5日 | |
サークル幹部 各位 | |
早稲田大学学生生活課 | |
第2回「東京六大学ハイク」を開催のお知らせ(締切迫る) | |
早稲田大学では、体育祭・総長杯スポーツ大会の一種目して、慶應義塾大学の三田キャ |
NewerOlder