Skip to content

Instantly share code, notes, and snippets.

View cympfh's full-sized avatar
🏠
Working from home

/c/ympfh cympfh

🏠
Working from home
View GitHub Profile
// http://pururin.com/browse/330/40/futanari.html
exec = require('execsync');
template =
"http://pururin.com/view/8727/#idx/a-certain-futanari-girls-masturbation-diary-chapter-3_#Idx.html"
for (var i=0; i<26; ++i) {
var idx = '0'+i;
url = template.replace('#idx', '0' + i)
@cympfh
cympfh / dot.sh
Last active August 29, 2015 13:57
#!/bin/bash
ID='12928'
FROM=1
TO=82
PREFIX=./energy/
for i in `seq ${FROM} ${TO}`; do
echo wget -O ${PREFIX}${i}.jpg $(curl http://thedoujin.com/index.php/pages/${ID}?Pages_page=${i} | grep max-width | cut -d '"' -f 2)
done
@cympfh
cympfh / ppm.hs
Created March 20, 2014 19:06
prepare P3 file.< in.ppm > out.ppm
import Control.Monad
import Data.Maybe
import Control.Applicative
import Control.Arrow
import qualified Data.ByteString.Char8 as B
import Text.Printf
readInt :: B.ByteString -> Int
readInt = fst . fromJust . B.readInt
[ { 'words': '5505', 'date': '2014/2/4 01:35:19' },
{ 'words': '5505', 'date': '2014/2/4 00:54:43' },
{ 'words': '5505', 'date': '2014/2/4 00:35:19' },
{ 'words': '5465', 'date': '2014/2/3 23:35:19' },
{ 'words': '5419', 'date': '2014/2/3 23:07:21' },
{ 'words': '5329', 'date': '2014/2/3 22:35:19' },
{ 'words': '5329', 'date': '2014/2/3 22:18:40' },
{ 'words': '5299', 'date': '2014/2/3 21:35:19' },
{ 'words': '5293', 'date': '2014/2/3 21:25:19' },
{ 'words': '5302', 'date': '2014/2/3 20:58:51' },
@cympfh
cympfh / tutorial.rs
Created April 26, 2014 17:25
Fuck the Rust
// http://static.rust-lang.org/doc/0.10/tutorial.html
/*
* rustc 0.11-pre-nightly (a692e9b 2014-04-26 01:16:23 -0700)
* host: x86_64-unknown-linux-gnu
*/
fn main() {
// ただの出力
import Debug.Trace
debug x = trace (show x) x
main = print $ sim "abc" "bcdef"
sim :: String -> String -> Bool
sim xs ys = n > 0
where n = last $ dp xs ys
#!/bin/bash
PREVONDO=0
while true; do
ONDO=`sensors | tail -2 | head -1 | cut -d'+' -f2 | cut -d '.' -f1`
if [[ $PREVONDO > 71 && $ONDO < 72 ]]; then
xdotool mousemove 2000 300 click 3
echo LOW $ONDO
fi
@cympfh
cympfh / fuck_mouse.sh
Last active October 28, 2015 10:03
toggle でマウスを殺す fuck the mouse
#!/bin/bash
if ls /tmp/mouse_off ; then
xinput --set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Off" 0
rm /tmp/mouse_off
else
xinput --set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Off" 1
touch /tmp/mouse_off
fi
@cympfh
cympfh / coch.vim
Last active August 29, 2015 14:01
2ch viwer
scriptencoding utf-8
" 17, 39 行目は書き換えの必要あり.
" 39行目は、板のタイトルとURLを交互に書いたテキストファイル
" Cochの起動コマンド
com! Coch :call s:Init2ch()
com! -nargs=1 NG :call <SID>AddtoNGs("<args>")
" グローバル変数
@cympfh
cympfh / twitter_search.js
Created May 18, 2014 09:26
node.js, ntwitter, search tweets
/*
* ntwitter で search 使うだけ
* see also: https://dev.twitter.com/docs/api/1.1/get/search/tweets
*/
var
me = {
"consumer_key": "6eURWj9HZNHLOHVjHlemA"
, "consumer_secret": "ePJ0KSEHskh1kzYzuAB6f8LCGegOknyfn8TghCIRY"
, "access_token_key": "++++4200+++++xK5jdZeo"