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 | |
$dom = new DOMDocument(); | |
@$dom->loadHTML(file_get_contents('http://user.keio.ac.jp/~rhotta/hellog/')); | |
$through = (new DOMXPath($dom))->query('//div[@id="links"]//a[@href="2009-06-20-1.html"]'); | |
if ($through->length === 1) { | |
echo "今日のthrough: {$through[0]->nodeValue}\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 | |
$f = file_get_contents('https://gist.githubusercontent.com/chitoku-k/f3e28b295523ad09e2863a6752ed685f/raw/416f4f79f7ebc77a6eb043630366cf7e6121a4f1/gista-file'); | |
echo json_encode(array_values(array_filter(explode("\n", $f), function ($v) { | |
return $v !== ''; | |
}))); |
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
<textarea id="t"></textarea> | |
<style> | |
#t { | |
height: calc(1em + 2px); | |
font-size: 1em; | |
outline: none; | |
resize: none; | |
} | |
</style> |
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 | |
require_once 'vendor/autoload.php'; | |
use mpyw\Cowitter\Client; | |
$client = new Client([ | |
'CK', | |
'CS', | |
'AT', | |
'ATS' |
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
array=$(find . -type d \( -name 'node_modules' -o -name 'vendor' \) -prune -o -type f \( -name '*.js' -o -name '*.php' \) -print) | |
for a in $array; do | |
start=$(expr $(wc -c < $a) - 2) | |
[[ $start -lt 0 ]] && continue | |
new_line=$(hexdump -s $start $a | cut -c 9-13) | |
[[ $new_line = '0a 0a' ]] && echo "$a: $new_line" | |
done |
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
// ==UserScript== | |
// @name TwitterCardLink with path | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description TwitterCardのURLにパスも表示する | |
// @author Hexin | |
// @match https://twitter.com/* | |
// @grant GM_xmlhttpRequest | |
// @connect t.co | |
// ==/UserScript== |
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
/* 右カラム */ | |
div[data-testid="sidebarColumn"] { | |
display: none; | |
} | |
/* n分前 */ | |
div[data-testid="tweet"] a[title][aria-label] { | |
visibility: hidden; | |
} |
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
autocmd TermOpen * autocmd TextYankPost <buffer> call <SID>SetLineJoinedLine(v:event) | |
function! s:SetLineJoinedLine(event) abort | |
const regcontents = a:event.regcontents | |
const regname = a:event.regname | |
const regtype = a:event.regtype | |
if regtype == 'V' | |
call setreg(regname, join(regcontents, ''), 'v') | |
endif |
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
// ==UserScript== | |
// @name 検索結果の言語切り替えるやつ | |
// @description 検索結果ページの言語を切り替えるボタンを表示します | |
// @namespace hexium310 | |
// @version 1.0.2 | |
// @author Hexin | |
// @match https://www.google.com/search* | |
// @resource MaterialIcons https://fonts.googleapis.com/icon?family=Material+Icons | |
// @grant GM_addStyle | |
// @grant GM_getResourceText |
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
gh api graphql --input <(jq -n --arg owner hexium310 --arg name brew-uo --arg query "$(cat file | tr '\n' ' ')" '{ query: $query, variables: { owner: $owner, name: $name } }') |
OlderNewer