Skip to content

Instantly share code, notes, and snippets.

View Taehun's full-sized avatar
👋
Hello world

Taehun Kim Taehun

👋
Hello world
View GitHub Profile
@Taehun
Taehun / google_trans.py
Last active August 29, 2015 14:01
Python Google Translator
#!/usr/bin/python
# -*- coding:utf-8 -*-
# Usage: $echo "This is google translator." | python google_trans.py [-i <Input Language>] [-o <Output Language>] [-s]
import sys
from BeautifulSoup import BeautifulSoup
import urllib2
import urllib
import re
import getopt
import os
@Taehun
Taehun / boot.ini
Created September 25, 2015 04:58
U-boot boot.ini to support xen
ODROIDXU-UBOOT-CONFIG
# source by kenken> http://forum.odroid.com/viewtopic.php?f=98&t=6643#p64051
setenv dtb_addr_r 0x42000000
setenv dtb_path /exynos5422-odroidxu3.dtb
setenv kernel_addr_r 0x60000000
setenv kernel_path /zImage
setenv xen_addr_r 0x50000000
setenv xen_path /xen
@Taehun
Taehun / gist:960475
Created May 7, 2011 12:59
switch area case in gcc
#include <stdio.h>
int main(void)
{
switch (15) {
case 10 ... 20:
printf("This case run.\n");
break;
default:
printf("Default\n");
@Taehun
Taehun / gist:1359720
Created November 11, 2011 23:56
연결 리스트 예제
#include <stdio.h>
#include <arch/types.h>
/**
* @brief 이중 연결 리스트 아이템.
*/
struct list_item {
struct list_item *prev, *next;
};
@Taehun
Taehun / merge_sub.py
Created April 3, 2012 12:19
Python: 리눅스용 한/영 통합자막 생성 스크립트
#!/usr/bin/python
# -*- coding:utf-8 -*-
# 사용법: ./merge_sub.py <자막 파일>
import sys
import os
import re
def main(argv):
en_start = False
@Taehun
Taehun / w5300e01_defconfig
Last active October 9, 2015 23:48
w5300e01_defconfig: WIZnet(http://wiznet.co.kr)'s W5300E01-ARM board linux kernel configuration
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.6.0-rc3 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
CONFIG_HAVE_PROC_CPU=y
CONFIG_NO_IOPORT=y
CONFIG_STACKTRACE_SUPPORT=y
@Taehun
Taehun / hello.c
Last active October 11, 2015 11:27
Linux Kernel Module Example: Hello kernel
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
static int __init hello_init(void)
{
printk(KERN_INFO "Hello kernel.\n");
return 0;
}
@Taehun
Taehun / stream.sh
Created October 9, 2012 01:15
Live stream shell script using ffmpeg in justin.tv
#!/bin/sh
# ref> http://onestep.tistory.com/83
INRES="1920x1080" # input resolution
OUTRES="640x360"
FPS="20" # target FPS
# Justin
STREAM_KEY="live_29225937_MudL5ituoYdWTqHSZkIrMqMxKTi0OG"
URL="rtmp://live.justin.tv/app/$STREAM_KEY"
@Taehun
Taehun / define_const.c
Last active October 12, 2015 08:57
Define #define constant for compile time in gcc
#include <stdio.h>
#define _2_0 (1)
#define _2_1 (_2_0*2)
#define _2_2 (_2_1*2)
#define _2_3 (_2_2*2)
#define _2_4 (_2_3*2)
#define _2_5 (_2_4*2)
#define _2_6 (_2_5*2)
#define _2_7 (_2_6*2)
@Taehun
Taehun / jarvis.py
Created January 12, 2016 01:05
구글 음성 인식 예제
#!/usr/bin/python
#-*- coding: utf-8 -*-
from gtts import gTTS
import os
import json
import sys
owner = '브라이언'
while True: