Skip to content

Instantly share code, notes, and snippets.

View unstabler's full-sized avatar
๐Ÿง€
cheese rulez!

Gyuhwan Parkโ˜… unstabler

๐Ÿง€
cheese rulez!
View GitHub Profile
@unstabler
unstabler / cranberry.pl
Created May 16, 2013 12:55
cranberry.pl
#!/usr/bin/env perl
package Cranberry;
use 5.010;
use strict;
use warnings;
use HTTP::Status qw/status_message/;
use HTTP::Request;
use HTTP::Response;
use IO::Socket;
@unstabler
unstabler / ahh.pl
Created August 20, 2013 07:35
์•„ํ–ํ–.. Cygwin์—์„œ CP949 ๋ฌธ์ž ๊นจ์ง ํ˜„์ƒ์„ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด ์ผ๋ณธ ์ชฝ์—์„œ ์ž์ฃผ ์“ฐ์ด๋Š” nkf๋ž‘ ๋น„์Šทํ•œ ์šฉ๋„์˜ ์Šคํฌ๋ฆฝํŠธ.
#!/usr/bin/env perl
use utf8;
use strict;
use warnings;
use Encode qw/decode/;
binmode STDOUT, ":utf8";
local $| = 1;
my $enc = ($ARGV[0]?$ARGV[0]:"cp949");
@unstabler
unstabler / _battery_status.pl
Last active December 27, 2015 07:48
oh my zsh theme
#!/usr/bin/env perl
use 5.014;
use strict;
my $switch = $ARGV[0];
my $battery_state = `acpi`;
if ($battery_state =~ m{Battery \d: (?<status>\w+), (?<percentage>\d+)}) {
my ($status, $percentage);
$percentage = $+{percentage};
[์นด์นด์˜คํ†ก ShadowWnd / EdgeWnd ์ˆจ๊ฒจ๋ฒ„๋ฆฌ๊ธฐ]
Description=์นด์นด์˜คํ†ก ShadowWnd / EdgeWnd ์ˆจ๊ฒจ๋ฒ„๋ฆฌ๊ธฐ
skippager=true
skippagerrule=2
skipswitcher=true
skipswitcherrule=2
skiptaskbar=true
skiptaskbarrule=2
title=KakaoTalk(Shadow|Edge)Wnd
titlematch=3
[LINE ํ…Œ๋‘๋ฆฌ ์—†์• ๋ฒ„๋ฆฌ๊ธฐ]
Description=LINE ํ…Œ๋‘๋ฆฌ ์—†์• ๋ฒ„๋ฆฌ๊ธฐ
clientmachine=cheesepc
clientmachinematch=0
ignoregeometry=true
ignoregeometryrule=2
minimize=true
minimizerule=2
size=0,0
sizerule=2

Twitterๅ…ฌๅผใ‚ฏใƒฉใ‚คใ‚ขใƒณใƒˆใฎใ‚ณใƒณใ‚ทใƒฅใƒผใƒžใ‚ญใƒผ

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA

@unstabler
unstabler / nicodownload.pl
Last active August 29, 2015 14:02
๋‹ˆ์ฝ”๋‹ˆ์ฝ” ๋™ํ™” ๋™์˜์ƒ ๋‹ค์šด๋กœ๋“œ ์Šคํฌ๋ฆฝํŠธ
#!/usr/bin/env perl
# nicodownload.pl
# ๋‹ˆ์ฝ”๋‹ˆ์ฝ” ๋™ํ™”์˜ ๋™์˜์ƒ์„ ๋‹ค์šด๋ฐ›์•„ ์ค๋‹ˆ๋‹ค.
# ์‚ฌ์šฉ ์ „์— ํ™˜๊ฒฝ ๋ณ€์ˆ˜ $NICOVIDEO_USERNAME์—๋Š” ์‚ฌ์šฉ์ž ID, $NICOVIDEO_PASSWORD์— ๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ์ง€์ •๋˜์–ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
# ๊ธฐ๋ณธ์ ์œผ๋กœ๋Š” ์ด์ฝ”๋…ธ๋ฏธ(์ €ํ™”์งˆ) ๋ชจ๋“œ์—์„œ ๋™์˜์ƒ์€ ๋‹ค์šด๋กœ๋“œ ๋ฐ›์ง€ ์•Š์ง€๋งŒ, --accept-economy ์˜ต์…˜์„ ๋„ฃ์œผ๋ฉด ๊ฐ•์ œ๋กœ ๋‹ค์šด๋ฐ›๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.
# --force-economy ์˜ต์…˜์œผ๋กœ ๊ฐ•์ œ๋กœ ์ €ํ™”์งˆ๋กœ ๋‹ค์šด๋กœ๋“œ๋ฐ›์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
# --write-to-stdout๋กœ ํ‘œ์ค€ ์ถœ๋ ฅ์œผ๋กœ ๋™์˜์ƒ ํŒŒ์ผ์„ ์“ฐ๋„๋ก ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ใ…œ
use 5.010;
use utf8;
@unstabler
unstabler / encode-all.sh
Last active March 24, 2017 09:25
ffserver streaming
#!/bin/sh
for file in *.avi
do
file_without_ext=$(echo "$file" | sed -e 's/\.avi//')
subtitle="$file_without_ext.smi"
outfile="$file_without_ext.ts"
if ! [ -f "$subtitle" ]
then
echo "์ž๋ง‰ ํŒŒ์ผ $subtitle ์ด ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค! ๋‹ค์Œ์œผ๋กœ ๋„˜์–ด๊ฐ‘๋‹ˆ๋‹ค.." | tee -a encode.log
continue
@unstabler
unstabler / screen-caputre.sh
Created October 13, 2014 00:01
ffmpeg x11grab๋ฅผ ์ด์šฉํ•œ ์Šคํฌ๋ฆฐ ์บก์ณ
#!/bin/sh
OUTFILE=$1
if [ -z $OUTFILE ]
then
OUTFILE='out.mp4'
fi
XWININFO=$(xwininfo -frame)
WINDOW_RES=$(echo $XWININFO | perl -ne 'print $1 if /geometry\s+(\d+x\d+)/')
@unstabler
unstabler / ffcapture.pl
Last active December 30, 2015 08:10
X Window์˜ ํ™”๋ฉด์„ ์‰ฝ๊ฒŒ ๋™์˜์ƒ์œผ๋กœ ์บก์ณํ•  ์ˆ˜ ์žˆ๋„๋ก ๋„์™€์ฃผ๋Š” ์Šคํฌ๋ฆฝํŠธ
#!/usr/bin/env perl
#
# ffcaputre.pl
# - by unstabler / cheesekun ([email protected])
# http://unstabler.pl / twitter: @unstable_cheese
#
# ffmpeg๋ฅผ ์ด์šฉํ•˜์—ฌ X ์œˆ๋„์šฐ์˜ ํ™”๋ฉด์„ ์‰ฝ๊ฒŒ ๋™์˜์ƒ์œผ๋กœ ์บก์ณํ•  ์ˆ˜ ์žˆ๋„๋ก ๋„์™€์ฃผ๋Š” ์Šคํฌ๋ฆฝํŠธ์ž…๋‹ˆ๋‹ค.
#
# TODO : ํŠน์ • ์˜์—ญ ๋…นํ™” ์ถ”๊ฐ€ ($ ffcapture.pl -x 0 -y 0 -w 1280 -h 720 out.avi)