Skip to content

Instantly share code, notes, and snippets.

View sangheonhan's full-sized avatar
๐Ÿค”
Minimalizing...

Sangheon Han sangheonhan

๐Ÿค”
Minimalizing...
View GitHub Profile
@sangheonhan
sangheonhan / composer.json
Created January 11, 2019 07:09
PHP ๋„๊ตฌ๋ฅผ ์„ค์น˜ํ•˜๊ธฐ ์œ„ํ•œ ์ „์—ญ(global) composer.json ํŒŒ์ผ
{
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
},
{
"type": "pear",
"url": "http://doc.php.net"
}
@sangheonhan
sangheonhan / composer.json
Created January 11, 2019 07:09
ํŒŒ์ผ ์ด๋ฆ„์„ ์ด์šฉํ•ด id3v2 ํƒœ๊ทธ์˜ ๊ณก ์ด๋ฆ„, ์•จ๋ฒ” ์ด๋ฆ„, ์•„ํ‹ฐ์ŠคํŠธ์„ ๊ฐฑ์‹ ํ•˜๋Š” ์Šคํฌ๋ฆฝํŠธ
{
"name": "bookworm/fixid3",
"description": "Fix encoding of ID3 tags",
"require": {
"nette/finder": "2.2.*",
"nass600/get-id3": "dev-master"
},
"authors": [
{
"name": "bookworm",
@sangheonhan
sangheonhan / randkey.php
Created January 11, 2019 07:09
์ˆซ์ž, ์•ŒํŒŒ๋ฒณ ๋Œ€์†Œ๋ฌธ์ž๋กœ ์ผ์ • ๊ธธ์ด์˜ ๋ฌด์ž‘์œ„ ํ‚ค๋ฅผ ๋งŒ๋“ค์–ด์ฃผ๋Š” ์Šคํฌ๋ฆฝํŠธ
#! /usr/bin/env php
<?php
$seed = array_merge(range('0', '9'), range('a', 'z'), range('A', 'Z'));
$seed_size = count($seed);
shuffle($seed);
$length = (isset($argv[1])) ? intval($argv[1]) : 32;
$randkey = '';
for ($i = 0; $i < $length; $i++) {
@sangheonhan
sangheonhan / 90-fonts-nanum.xml
Created January 11, 2019 07:09
๋‚˜๋ˆ”ํฐํŠธ ํžŒํŒ… ์šฐ๋ถ„ํˆฌ ์„ค์ •
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>NanumGothic</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<alias>
@sangheonhan
sangheonhan / clone_and_pull.pl
Created January 11, 2019 07:09
์›๊ฒฉ Git ์ €์žฅ์†Œ๋“ค์„ ๋ฐฑ์—… ๋ชฉ์ ์œผ๋กœ clone ๋˜๋Š” pull ํ•˜๋Š” ์Šคํฌ๋ฆฝํŠธ
#! /usr/bin/env perl
use strict;
use warnings;
use Git::Repository;
my $fh;
open $fh, '-|', 'ssh xen01vm02 ls /home/bookworm/git/' or die('Can\'t open remote git repository');
while ( my $dir = <$fh> ) {
@sangheonhan
sangheonhan / arrange.pl
Created January 11, 2019 07:09
์™€์šฐ ์Šคํฌ๋ฆฐ์ƒท ํŒŒ์ผ ์ด๋ฆ„ ์ •๋ฆฌ
#! /usr/bin/perl
use strict;
use warnings;
my @files = glob("*.jpg *.png *.tga");
foreach ( @files ) {
my $new_filename_prefix;
my $new_filename_postfix;
@sangheonhan
sangheonhan / wow-hotkey-j.vbs
Created January 11, 2019 07:09
์›”๋“œ ์˜ค๋ธŒ ์›Œํฌ๋ž˜ํ”„ํŠธ ๋‹จ์ถ•ํ‚ค๋ฅผ ๋ฐ˜๋ณตํ•ด์„œ ๋ˆŒ๋Ÿฌ์ฃผ๋Š” VBScript
Dim WshSHell
set WshShell = CreateObject("WScript.Shell")
Do While True
set service = GetObject ("winmgmts:")
Dim flag
flag = False
For Each Process in Service.InstancesOf ("Win32_Process")
If Process.Name = "Wow-64.exe" Then
WshShell.AppActivate("์›”๋“œ ์˜ค๋ธŒ ์›Œํฌ๋ž˜ํ”„ํŠธ")
@sangheonhan
sangheonhan / dumpsvn.pl
Created January 11, 2019 07:09
ํŠน์ • ๋””๋ ‰ํ† ๋ฆฌ ์•ˆ์˜ svn ์ €์žฅ์†Œ๋“ค์„ ๋คํ”„ํ•˜๋Š” ํŽ„ ์Šคํฌ๋ฆฝํŠธ
#! /usr/bin/perl
use strict;
use warnings;
if ( $#ARGV < 0 ) {
print "Usage : dumpsvn.pl <svn root dir>\n";
exit 1;
}
@sangheonhan
sangheonhan / terminal-color.sh
Created January 11, 2019 07:09
ํ„ฐ๋ฏธ๋„ 256์ƒ‰ ์ถœ๋ ฅ (bash)
#! /bin/bash
COLUMNS=15
x=`tput op`
y=`printf %$((${COLUMNS}-6))s`
for i in {0..256}
do
o=00$i
echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x
done
@sangheonhan
sangheonhan / standard_deviation.pl
Created January 11, 2019 07:09
์ˆซ์ž๋“ค์˜ ํ‘œ์ค€ ํŽธ์ฐจ๋ฅผ ๊ตฌํ•˜๋Š” ์Šคํฌ๋ฆฝํŠธ
#! /usr/bin/perl
use strict;
use warnings;
use POSIX qw/floor ceil/;
my @data;
while ( <> ) {
chomp;