Skip to content

Instantly share code, notes, and snippets.

View ganadist's full-sized avatar

YOUNG HO CHA (aka ganachoco) ganadist

  • Seoul, Republic of Korea
View GitHub Profile
@ganadist
ganadist / write_addon_xml
Created January 21, 2013 15:03
Simple generator for android sdk addon host and distribute This script is tested on python 2.7 and 3.2
#!/usr/bin/env python
import sys, os
import hashlib
import zipfile
VENDORS = {
# vendor desc : vendor id
'Google Inc.' : 'google',
'LG Electronics' : 'lge',
'Intel Corporation': 'intel_corporation',
@ganadist
ganadist / master.cfg.py
Created February 2, 2013 14:55
sample bulidbot confguration
# -*- python -*-
# vim: ts=4 sw=4 sts=4 expandtab syntax=python
# This is a sample buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory.
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
import os
__basedir__ = os.path.abspath(os.path.dirname(__file__))
@ganadist
ganadist / facebook_push.py
Last active December 12, 2015 06:28
simple push message script via facebook messenger
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: ts=4 st=4 sts=4 expandtab syntax=python
import sys, os, time
if not 'DISPLAY' in os.environ:
os.environ['DISPLAY'] = ':2'
import gi
@ganadist
ganadist / getCommitCount.py
Last active December 14, 2015 08:28
get commit count from AOSP
#!/usr/bin/env python
# -*- coding : utf-8 -*-
import sys, os
import subprocess
import xml.dom.minidom
BOTS = ('[email protected]',
'[email protected]',
'[email protected]',
@ganadist
ganadist / goldfish_defconfig_generated
Created March 12, 2013 11:43
generated goldfish x86 defconfig
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.4.0 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
@ganadist
ganadist / kconfig.diff
Created March 13, 2013 00:43
output of git diff android-goldfish-2.6.29 android-goldfish-3.4 kernel/trace/Kconfig
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 34e707e..a1d2849 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -9,27 +9,50 @@ config USER_STACKTRACE_SUPPORT
config NOP_TRACER
bool
+config HAVE_FTRACE_NMI_ENTER
+ bool
document.getElementById('general').value = 'on'
document.getElementById('terms').value = 'on'
document.getElementById('io-register').submit()
@@ -127,7 +127,15 @@ class WorkerThread(Thread):
sleep(0.5)
req_sc.send('Host: ')
- for c in phost:
+ def feed_phost(phost):
+ import random
+ i = 1
+ while phost:
+ yield random.randrange(1, 3), phost[:i]
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from gi.repository import Pango, Gtk
TEXT = """<span color="red">\xe1\x84\x80\xe1\x85\xa1\xe1\x84\x82</span>\xe1\x85\xa1\xe1\x86\xab\xe1\x84\x8d\xe1\x85\xa9\xe1\x84\x81\xe1\x85\xa9\xe1\x84\x85\xe1\x85\xa6\xe1\x86\xba ganachoco"""
# ㄱ ㅏ ㄴ ㅏ ㄴ ㅉ ㅗ ㄲ ㅗ ㄹ ㅔ ㅅ
if __name__ == '__main__':
win = Gtk.Window()
n1 = 0
n2 = 1
MAX = 400 * 10000
sum = 0
while n2 <= MAX:
n3 = n1 + n2
if n3 % 2 == 0:
sum += n3
n1, n2 = n2, n3
print sum