Skip to content

Instantly share code, notes, and snippets.

View ShinJJang's full-sized avatar
๐ŸŽฏ
Focusing

shinjjang ShinJJang

๐ŸŽฏ
Focusing
View GitHub Profile
@ShinJJang
ShinJJang / info.txt
Created July 1, 2016 04:13 — forked from phrawzty/info.txt
python27 in CentOS via SCL on Socorro Vagrant
(socorro-virtualenv)[vagrant@localhost ~]$ cat /etc/centos-release
CentOS release 6.4 (Final)
(socorro-virtualenv)[vagrant@localhost ~]$ sudo yum install centos-release-SCL
[...]
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
function ping(ip, callback) {
if (!this.inUse) {
this.status = 'unchecked';
this.inUse = true;
this.callback = callback;
this.ip = ip;
var _that = this;
this.img = new Image();
this.img.onload = function () {
@ShinJJang
ShinJJang / Readme.md
Created April 2, 2016 07:41 — forked from gabrielemariotti/Readme.md
A SimpleSectionedRecyclerViewAdapter: use this class to realize a simple sectioned `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)

This is a porting of the class SimpleSectionedListAdapter provided by Google

Screen

Example:

@ShinJJang
ShinJJang / detect.java
Last active December 5, 2021 16:00
Test for detect virtual device in android
// This is not perfect
private boolean isVirtualDeivce() {
String msg = "BOARD = " + Build.BOARD +
"\nBOOOTLOADER = " + Build.BOOTLOADER +
"\nBRAND = " + Build.BRAND +
"\nDEVICE = " + Build.DEVICE +
"\nDISPLAY = " + Build.DISPLAY +
"\nFINGERPRINT = " + Build.FINGERPRINT +
"\nHARDWARE = " + Build.HARDWARE +
"\nHOST = " + Build.HOST +
@ShinJJang
ShinJJang / nginx.conf
Created March 19, 2016 06:58 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ShinJJang
ShinJJang / url_split.py
Created March 17, 2016 08:35
URL Split
import re
from operator import is_not
from functools import partial
def splitAddress(address):
pat = re.compile("(\w+)://(\w+).com(?:/(\w+))?")
m = pat.match(address)
return filter(partial(is_not, None), m.groups())
@ShinJJang
ShinJJang / recommend_steambb.js
Created December 27, 2015 05:55
์ŠคํŒ€ ๋น„๋น„ ํ• ์ธ ์š”์•ฝ ํŽ˜์ด์ง€์—์„œ ์ถ”์ฒœ ์ˆ˜ 5 ์ด์ƒ์„ ํŒŒ๋ž€์ƒ‰์œผ๋กœ ๋ณ€๊ฒฝ
$(".setGood div").each(function(index) {if ($(this)[0].innerText > 5) $(this).css("background-color", "BLUE");});
@ShinJJang
ShinJJang / settings.py
Created November 22, 2015 04:50
Django templates directory ์„ค์ •
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# ๋‹ค๋ฅธ ์„ค์ •๋“ค...
TEMPLATE_DIR = os.path.join(BASE_DIR, 'templates')
@ShinJJang
ShinJJang / ์˜ค์œ _์ค‘์š”ํ•œ_๋Œ“๊ธ€๋งŒ_๋ณด๊ธฐ.js
Last active November 18, 2015 01:13
์˜ค์œ  ์ค‘์š” ๋Œ“๊ธ€๋งŒ ๋ณด๊ธฐ for "์‹ค์‹œ๊ฐ„ ์•„๋ฐ”ํƒ€ ๊ฒŒ์ž„"
function loadReplySync(n, loadDelay) {
if (n == 0) {
setTimeout(function(){showOnlyImportant();}, 200);
return;
}
setTimeout(function() {
console.log("๋Œ“๊ธ€ ๋” ๊ฐ€์ ธ์˜ค๊ธฐ ์‹œ๋„ ๋‚จ์Œ: " + n);
loadMoreReply();
loadReplySync(n-1, loadDelay);
public class Test {
int value;
CustomException _e;
public static class NestedException extends RuntimeException {
public NestedException() {
super();
}
public NestedException(String message) {