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"); | |
} |
<?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); |
/** | |
* 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
<?php | |
/** | |
* @see dependencies: libreoffice, pyhwp https://pythonhosted.org/pyhwp/ko/ | |
* Class Anything2html | |
*/ | |
class Anything2html { | |
static $hwp5html; | |
static $libreoffice; | |
static $error; |
/** | |
* Download file from path and mimetype. | |
* | |
* @param $path | |
* @param $mimetype | |
* @param null $filename | |
*/ | |
function download_file ($path, $mimetype, $filename = NULL) { | |
if (empty($filename)) { | |
$filename = pathinfo($path, PATHINFO_BASENAME); |
<?php | |
/** | |
* Author: An, Hyeong-woo | |
* Email: mytory@gmail.com | |
* Blog: http://mytory.net | |
* Description: See detail on help message. You can see by running this script without args. | |
* Dependencies: Tidy extension. | |
*/ | |
function cmd_echo($str){ | |
echo $str . PHP_EOL; |
(function () { | |
"use strict"; | |
// 스매싱 매거진의 '지연된 웹폰트 불러오기' javascript를 안형우가 수정한 것. | |
// https://gist.github.com/hdragomir/8f00ce2581795fd7b1b7 | |
// 한 번 캐시하면 css 파일은 클라이언트 측에 저장한다. | |
// 아래 css_href 가 바뀌면 그 때 다시 받는다. | |
// woff base64를 내장한 css | |
var css_href = 'css/webfont.woff.css'; | |
// localStorage 를 지원하지 않는 브라우저를 위한 css |
var attachment_id = 1234; | |
var attachment = new wp.media.model.Attachment.get(attachment_id); | |
attachment.fetch({success:function(att){ | |
if (_.contains(['png','jpg','gif','jpeg'],att.get('subtype'))) { | |
console.log(att.attributes); | |
$("<img/>").attr("src",att.attributes.sizes.thumbnail.url).appendTo($("body")); | |
} | |
}}); |
FROM ubuntu:18.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
# repository | |
RUN sed -i 's|archive.ubuntu.com|mirror.kakao.com|g' /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get upgrade -y | |
# timezone |