Skip to content

Instantly share code, notes, and snippets.

View issess's full-sized avatar

SeungHoon Han issess

View GitHub Profile
@gennad
gennad / BFSDFS.java
Created January 23, 2011 09:14
Breadth-first search and depth-first search Java implementation
Class Main {
public void bfs()
{
// BFS uses Queue data structure
Queue queue = new LinkedList();
queue.add(this.rootNode);
printNode(this.rootNode);
rootNode.visited = true;
while(!queue.isEmpty()) {
Node node = (Node)queue.remove();
@jay3sh
jay3sh / stack-trace-without-exception.js
Created August 20, 2011 10:33
print stack trace anywhere
function foo(args) {
var i, j, k;
// ...
// j acquires some interesting value
// Who called foo when j took this interesting value?
//
var e = new Error('dummy');
var stack = e.stack.replace(/^[^\(]+?[\n$]/gm, '')
.replace(/^\s+at\s+/gm, '')
@shreeshga
shreeshga / gist:1627145
Created January 17, 2012 15:45
md5sum through brew
brew install md5sha1sum
@kkosuge
kkosuge / route53DynDNS.bash
Created March 2, 2012 19:58
Amazon Route 53 Dynamic DNS Updater Script
#!/bin/bash
### User Settings (things you must set)
## Location of the dnscurl.pl script
DNSCurl="/path/to/route53DynDNS/dnscurl.pl"
## The host name you wish to update/create
myHostName="*"
## Zone/domain in which host (will) reside(s)
myDomainName="example.com"
@gwwar
gwwar / KoreSampl.js
Created March 23, 2012 03:05
A simple helper that returns a list of elements at a given point using elementFromPoint
/**
* @author Kerry Liu
* WTFPL
**/
;(function(){
//test for ie: turn on conditional comments
var jscript/*@cc_on=@_jscript_version@*/;
var styleProp = (jscript) ? "display" : "pointerEvents";
var KoreSampl = function() {};
@synchrok
synchrok / eulrlega.java
Last active November 5, 2023 11:16
eulrlera (을를이가): 문자열 뒤에 붙을 말이 을(이/은)인지 를(가/는)인지 알려주는 함수
public class Utility {
public static boolean eulrlega(String word) {
char last = word.charAt(word.length()-1);
if(last < 0xAC00)
return true;
last -= 0xAC00;
char jong = (char) ((last % 28) + 0x11a7);
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@chrisbanes
chrisbanes / ForegroundLinearLayout.java
Created February 19, 2014 13:16
ForegroundLinearLayout
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@chitacan
chitacan / gist:11200703
Last active September 4, 2018 08:13
AOSP 4.4_r1 의 네이티브 코드를 gdb 로 디버깅 해보자!!

hack aosp with gdb

AOSP 4.4_r1 의 네이티브 코드를 gdb 로 디버깅 해보자!!

  • 안드로이드 어플리케이션을 실행할 때 사용되는 네이티브 코드(libbinder등) 은 어떻게 디버깅 할 수 있을까?
  • 안드로이드 단말이나 에뮬레이터의 /system/bin/ 아래에 있는 바이너리들(service, am, pm 등등) 어떻게 디버깅할 수 있을까?

준비물

  • 단말이나 에뮬레이터를 타겟으로 잘(!?) 빌드된 AOSP
@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active March 15, 2024 06:39
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software