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 | |
TARGET_URL="$1" | |
BASE_URL=$(dirname $TARGET_URL) | |
NEXT_URL="go first" | |
until [ -z "$NEXT_URL" ] | |
do | |
w3m -I cp949 -O cp949 -cols 72 -dump $TARGET_URL | awk 'BEGIN {sw=""} /\[목록보기\]/ {sw=""} {if (sw) print} /댓글 부분으로/ {sw="ok"}' | |
NEXT_URL=$(w3m -dump_source $TARGET_URL | grep -m 1 "윗글" | awk -F\' '{print $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
#!/bin/bash | |
FIFO="/tmp/mpvpipe" | |
TARGET=$1 | |
if [ "x--" = "x$TARGET" ]; then | |
TARGET=$2 | |
fi | |
PID=$(fuser $FIFO 2> /dev/null) |
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
var fs = require('fs'); | |
var request = require('request'); | |
var base64 = require('base64-stream'); | |
var JSONStream = require('JSONStream'); | |
var visionArgs = {key: fs.readFileSync('vision.key')}; | |
var visionUrl = 'https://vision.googleapis.com/v1/images:annotate'; | |
var reader = process.stdin.pipe(base64.encode()); | |
var writer = request.post({ |
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 | |
$epoch = microtime(true); | |
function times(int $a) { | |
global $epoch; | |
$i = 0; | |
while (++$i <= $a) { | |
//sleep(1); | |
var_dump(microtime(true) - $epoch); |
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 | |
modprobe vfio-pci | |
for dev in "$@"; do | |
if [ -e /sys/bus/pci/drivers/vfio-pci/$dev ]; then | |
continue | |
fi | |
vendor=$(cat /sys/bus/pci/devices/$dev/vendor) | |
device=$(cat /sys/bus/pci/devices/$dev/device) |
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
#!/usr/bin/python3 | |
import os, re, logging | |
from glob import glob | |
from pipes import quote | |
from shutil import rmtree | |
SOURCES = ('/mnt/1.5T/,movie/','/mnt/1.5T/,tv/',) | |
LOGFILE = '/home/keizie/.brag/autounrar.log' | |
EXECUTE_RAR = 'unrar' |
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 itertools import combinations | |
from pprint import pprint | |
bundle = [51,49,5] | |
candidates = [bundle] | |
loop = True | |
loop_count = 0 | |
largest_member = [] |