This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
create table inputtmp (v integer); | |
create table input (i integer primary key autoincrement, v integer); | |
.separator X " " | |
.import /dev/stdin inputtmp | |
.headers on | |
.mode column | |
.separator "|" "\n" | |
delete from inputtmp limit 1; | |
insert into input select v from inputtmp; |
This file contains hidden or 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
#lang racket | |
(require racket/control) | |
(define (amb args) | |
(shift k | |
(for ([v args]) | |
(k v)))) | |
(define (perm li) | |
(if (null? (cdr li)) |
This file contains hidden or 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
import Data.Char | |
import Data.List | |
import Data.Function | |
import Data.Monoid | |
comp::String->String->Ordering | |
comp (as@(a:ax)) (bs@(b:bx)) | |
| isNumber a && isNumber b = | |
ncomp as bs <> (comp `on` dropWhile isNumber) as bs | |
| otherwise = compare a b <> comp ax bx |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder