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 -u | |
### search.sh | |
# searches specified words on Twitter. | |
# | |
# useage: ./search.sh word | |
# requirements: jq, curl, perl | |
# example: ./search.sh hoge | cut -f 1 | sort -u > blocklist.csv | |
QUERY=$(echo ${1:?"search.sh query"} | jq -R '@uri') |
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
{ | |
search(query: "stars:>5000 language:Java", type: REPOSITORY, first: 100) { | |
repositoryCount, | |
pageInfo { | |
hasNextPage, | |
endCursor | |
}, | |
nodes { | |
... on Repository { | |
nameWithOwner, |
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 -xu | |
## Required Environment Variables | |
# | |
# REVIEWBOARD_TOKEN: Access tokens for Review Board user. | |
# REVIEW_DIFF_URL: Posted review request URL. (ex. https://example.org/reviews/api/review-requests/99999/diffs/1/) | |
# | |
# upgrade workspace(for unexpectedly subversion binary upgrade) | |
svn upgrade |
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
/* | |
* scwrap 環境変数にシステム設定を入れてくれるいい感じのアレ | |
* | |
* 使い方: scwrap cmd [cmdargs..] | |
* | |
* 例(希望): sudo scwrap port selfupdate | |
*/ | |
#include <stdio.h> | |
#include <unistd.h> |
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 -ue | |
# すごーいを取ってくるやつ。 | |
# $ACCESS_TOKENはweb clientのstreamingのパラメーターにあるものを使うと楽。 | |
# useage: | |
# $ ./favs.sh $ACCESS_TOKEN | |
ACCESS_TOKEN=${1:?./favs.sh ACCESS_TOKEN [max_id]} | |
MASTODON='https://mstdn.kemono-friends.info' |
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
NSData *data = [NSURLConnection sendSynchronousRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://tumblr.com"]] | |
returningResponse:nil | |
error:nil]; | |
[data writeToFile:@"text.html" atomically:YES]; |
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
OIFS=$IFS | |
IFS=$'\n' | |
HASH=$(mktemp) | |
mkdir -p dup | |
for i in $(find . -maxdepth 1 -type f -not -empty -print0 | xargs -0 ls -rt); do | |
M=$(md5 -q $i); | |
if [ ! -z $(grep $M $HASH) ]; then | |
echo "DUP" $M $i; | |
mv $i dup |
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
// utility ---------------------------------------------------------- | |
function isGenerator(o) { | |
return (typeof o === "object") && (typeof o.next === "function"); | |
} | |
function isPromise(o) { | |
return (typeof o === "object") && (typeof o.then === "function"); | |
} | |
function isTag(o) { | |
return (typeof o === "object") && (o.tag === "tag"); | |
} |
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
// -*- coding: utf-8 -*- | |
/** | |
* @param {function} f funciton. | |
* @return {String[]} argument names. | |
*/ | |
function argNames(f) { | |
var re = /^[\s\(]*function[^(]*\((.*?)\)/; | |
var args = f.toString().match(re)[1].split(','); | |
return args.map(function(e) { |
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
# -*- coding: utf-8 -*- | |
from selenium import webdriver | |
from selenium.webdriver.support.ui import Select | |
from selenium.webdriver.common.alert import Alert | |
import os | |
import sys | |
import mechanize | |
import random | |
import re | |
import time |
NewerOlder