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 | |
soffice --headless --convert-to html:HTML "$1" | |
basename=$(basename "$1") | |
filename="${basename%.*}" | |
html2text "$filename.html" > "$filename.md" |
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 | |
// Emulate register_globals on | |
// source: http://php.net/manual/en/faq.misc.php#faq.misc.registerglobals | |
if (!ini_get('register_globals')) { | |
$superglobals = array($_SERVER, $_ENV, | |
$_FILES, $_COOKIE, $_POST, $_GET); | |
if (isset($_SESSION)) { | |
array_unshift($superglobals, $_SESSION); | |
} | |
foreach ($superglobals as $superglobal) { |
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 | |
// Emulate register_globals off | |
// source: http://php.net/manual/en/faq.misc.php#faq.misc.registerglobals | |
function unregister_GLOBALS() | |
{ | |
if (!ini_get('register_globals')) { | |
return; | |
} | |
// Might want to change this perhaps to a nicer error |
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
/** | |
초성 중성 종성 분리 하기 | |
유니코드 한글은 0xAC00 으로부터 | |
초성 19개, 중상21개, 종성28개로 이루어지고 | |
이들을 조합한 11,172개의 문자를 갖는다. | |
한글코드의 값 = ((초성 * 21) + 중성) * 28 + 종성 + 0xAC00 | |
(0xAC00은 'ㄱ'의 코드값) |
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
/** | |
초성 중성 종성 분리 하기 | |
유니코드 한글은 0xAC00 으로부터 | |
초성 19개, 중상21개, 종성28개로 이루어지고 | |
이들을 조합한 11,172개의 문자를 갖는다. | |
한글코드의 값 = ((초성 * 21) + 중성) * 28 + 종성 + 0xAC00 | |
(0xAC00은 'ㄱ'의 코드값) |
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 | |
// filename : iconv.php | |
if($argc != 4){ | |
echo "invalid arg!\nsyntax) php {$argv[0]} from to filename\nex) php {$argv[0]} euc-kr utf-8 /path/to/filename\n"; | |
exit(0); | |
} | |
$from = $argv[1]; | |
$to = $argv[2]; | |
$filename = $argv[3]; |
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
export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\n\[\e[0m\]$ ' | |
export PATH="$(brew --prefix josegonzalez/php/php54)/bin:$PATH" | |
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH | |
export EDITOR=nano | |
PATH=$PATH:/usr/local/mysql/bin | |
alias ls='gls --color=auto -F' | |
source .git-completion.bash |
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
// Simulates PHP's date function | |
Date.prototype.format = function(format) { | |
var returnStr = ''; | |
var replace = Date.replaceChars; | |
for (var i = 0; i < format.length; i++) { var curChar = format.charAt(i); if (i - 1 >= 0 && format.charAt(i - 1) == "\\") { | |
returnStr += curChar; | |
} | |
else if (replace[curChar]) { | |
returnStr += replace[curChar].call(this); | |
} else if (curChar != "\\"){ |
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 | |
filename=$(shuf -n1 -e /home/mytory/wallpapers/*) | |
Esetroot -f $filename |
OlderNewer