Reference: http://smithfarm-thebrain.blogspot.com.br/2014/04/how-to-install-ruby-gems-in-opensuse.html
zypper in -t pattern devel_basis
zypper in ruby-devel
zypper in nodejs
gem install jekyll
gem install execjs
<?php | |
/** | |
* @see dependencies: libreoffice, pyhwp https://pythonhosted.org/pyhwp/ko/ | |
* Class Anything2html | |
*/ | |
class Anything2html { | |
static $hwp5html; | |
static $libreoffice; | |
static $error; |
<?php | |
function batch_convert_encoding($dir, $out_charset = 'utf-8'){ | |
if($handle = opendir($dir)){ | |
echo "\n\n## Directory is $dir\n\n"; | |
while(false !== ($file = readdir($handle))){ | |
if(in_array($file, array('.', '..', '.git'))){ | |
continue; | |
} | |
$file_path = realpath($dir . DIRECTORY_SEPARATOR . $file); | |
$pathinfo = pathinfo($file_path); |
<?php | |
function print_file_encoding_from($dir){ | |
if($handle = opendir($dir)){ | |
echo "\n\n## Directory is $dir\n\n"; | |
while(false !== ($file = readdir($handle))){ | |
if(in_array($file, array('.', '..', '.git'))){ | |
continue; | |
} | |
$file_path = realpath($dir . DIRECTORY_SEPARATOR . $file); | |
$extension = pathinfo($file_path, PATHINFO_EXTENSION); |
<?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 |
<?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) { |
#/bin/sh | |
soffice --headless --convert-to html:HTML "$1" | |
basename=$(basename "$1") | |
filename="${basename%.*}" | |
html2text "$filename.html" > "$filename.md" |
/** | |
* Create Select2 library field that also can direct input. | |
* @param selector | |
*/ | |
function direct_write_select2(selector){ | |
$(selector).select2({ | |
minimunInputLength: 1, | |
query: function(options){ | |
var data = {results: []}; | |
var dataSource; |
Reference: http://smithfarm-thebrain.blogspot.com.br/2014/04/how-to-install-ruby-gems-in-opensuse.html
zypper in -t pattern devel_basis
zypper in ruby-devel
zypper in nodejs
gem install jekyll
gem install execjs
// execute with nodejs on bash terminal. | |
var string = "test text"; | |
for(var i = 0; i < 110; i++){ | |
// 스타일링 : \033[스타일번호m문자열\033[m | |
// 강조 스타일링 : \033[01;스타일번호m문자열\033[m | |
console.log(i + " => " + "\033[" + i + "m" + string + "\033[m" + " " + "\033[01;" + i + "m" + string + "\033[m"); | |
} |
#!/bin/sh | |
filename=$(shuf -n1 -e /home/mytory/wallpapers/*) | |
Esetroot -f $filename |