Skip to content

Instantly share code, notes, and snippets.

View dsdstudio's full-sized avatar
🎹
Focusing

Bohyung kim dsdstudio

🎹
Focusing
View GitHub Profile
@dsdstudio
dsdstudio / logback_defaultsetting
Created October 10, 2014 08:42
logback default setting programatically
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
BasicConfigurator.configure(lc);
@dsdstudio
dsdstudio / .gitignore
Last active August 29, 2015 14:07 — forked from rjmunro/.gitignore
# Android
platforms/android/assets/www
platforms/android/bin/
platforms/android/gen/
platforms/android/res/xml/config.xml
# iOS
platforms/ios/build/
platforms/ios/CordovaLib/build/
platforms/ios/www
@dsdstudio
dsdstudio / jssort.js
Created October 27, 2014 10:15
javascript sort
page = page.sort(function(a, b) {
var $a = a.SEQ || 0;
var $b = b.SEQ || 0;
if ( $a == $b ) return 0;
if ( $a < $b ) return -1;
return 1;
});
@dsdstudio
dsdstudio / _vimrc
Last active August 29, 2015 14:11
windows용 _vimrc 기본 설정
set enc=utf8
set fileencoding=utf8
set ts=4
set sw=4
set nu
set hlsearch
set ai
set nobackup
set visualbell
colorscheme darkblue
@dsdstudio
dsdstudio / jspstyle-tpl-engine.js
Last active August 29, 2015 14:20
간단한 한줄짜리 jsp style 템플릿 엔진
/**
* javascript jsp style micro template compiler
* template => <%= val %>
* */
function compile(tpl, data) {
var compiledStr = ''
,regex = '/\<\%\=(.+?)\%\>/gim'
,t0;
while((t0 = regex.exec(compiledStr)) != null)
compiledStr = compiledStr.replace(new Regexp(t0[0], 'gi'), data[t0[1]]);

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@dsdstudio
dsdstudio / json-to-formdata.js
Last active August 29, 2015 14:22
complex data structure json to form data
function jsonToFormData($json) {
function isObject($o) { return typeof $o === 'object' && $o !== null; }
function isFunction($o) { return typeof $o === 'function'; }
function visit($json, $arr, $prefix) {
var t0, i, j;
t0 = $arr || [];
$prefix = $prefix || '';
for (i in $json) {
if (isFunction($json[i])) continue;
if ( Array.isArray($json[i]) ) {
@dsdstudio
dsdstudio / ns-cheatsheet.clj
Last active September 2, 2015 10:12 — forked from ghoseb/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;;
;; * :import refers Java classes to the current namespace.
;;
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.
@dsdstudio
dsdstudio / GenericArgumentTest.java
Created February 20, 2012 02:10
Java Generic argument
import java.util.List;
import java.util.Collections;
public class GenericArgumentTest {
List<String> tokenList;
public void setTokenList(List<String> tokenList){
this.tokenList = tokenList;
}
@dsdstudio
dsdstudio / hack.sh
Created April 8, 2012 16:02 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#