Skip to content

Instantly share code, notes, and snippets.

@am0c
am0c / gist:2732468
Created May 19, 2012 21:41
C++ 과제
/* C++ 과제
* 1. 함수를 사용할 것 (예: 입력받는 함수, 평균구하는 함수, 석차구하는 함수, 출력하는 함수 등)
* 2. 함수 사용 시, 상황에 따라 값에 의한 전달 또는 참조에 의한 전달 기법을 선택하여 이용할 것
* 3. 과목 수, 학생 수에 상관없이 일반적으로 처리할 수 있는 융통성 있는 프로그램으로 작성할 것
*
* 추가조건
* 1. 클래스나 STL은 배우지 않았다고 함 (결국 C++보다는 C로 작성해야 함)
* 2. 전역 변수를 사용하는 대신 참조(포인터) 전달을 하는 것으로 대신함
*/
@am0c
am0c / snowyfog.9.js
Created December 18, 2011 15:32
Google: Let it snow
(function () {
var g = void 0,
k = !0,
m = null,
o = !1,
p, q = this,
r = function (a) {
var b = typeof a;
if ("object" == b) if (a) {
if (a instanceof Array) return "array";
@am0c
am0c / gist:1436572
Created December 6, 2011 03:28
grep_gstar.pl
#!/usr/bin/env perl
use utf8;
use 5.010;
use Dancer qw();
use Dancer::Plugin::Redis;
use Digest::MD5 qw(md5_hex);
use GD::Thumbnail;
use File::Basename;
use LWP::Simple;
# deb cdrom:[Ubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100429)]/ lucid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ftp.daum.net/ubuntu/ lucid main restricted
deb-src http://ftp.daum.net/ubuntu/ lucid main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ftp.daum.net/ubuntu/ lucid-updates main restricted
@am0c
am0c / gist:1171535
Created August 25, 2011 19:14
컴퓨터과학기초 제 3장 운영체제의 리눅스 관련 오류
아래 글에 오류가 있으면 언제든 알려주세요! --> http://twitter.com/am0c
-----------------------------------------------------------------
제목: [컴퓨터과학기초] 제 3장 운영체제의 리눅스 관련 오류
지금 교과서를 가지고 있지 않아서 정확한 페이지를 말씀드릴 수는 없습니다만,
컴퓨터과학기초 과목의 "3장 운영체제"를 보시면 리눅스에 대한 소개를 발견하실
수 있습니다. 리눅스에 대해 소개하는 첫번째 구절이 대략 다음과 같습니다.
@am0c
am0c / gist:1069391
Created July 7, 2011 12:19
[perl #93990] test script
#!/usr/bin/env perl
#
# run as:
# $ perl this_script.pl | perl
#
# [perl #93990]
use B::Deparse;
$dp = B::Deparse->new();
@am0c
am0c / gist:962378
Created May 9, 2011 11:35
simulating android af_local
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <unistd.h>
#include <stddef.h>
#include <errno.h>
#include <fcntl.h>
@am0c
am0c / gist:962371
Created May 9, 2011 11:22
ubuntu 10.04 lucid daum.net /etc/apt/sources.list
# deb cdrom:[Ubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100429)]/ lucid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ftp.daum.net/ubuntu/ lucid main restricted
deb-src http://ftp.daum.net/ubuntu/ lucid main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ftp.daum.net/ubuntu/ lucid-updates main restricted
@am0c
am0c / gist:960214
Created May 7, 2011 04:51
perlbrew on eshell
;; eshell init script which let
;; perlbrew to be enabled in emacs eshell environment
;; it is translated from $HOME/perl5/perlbrew/etc/bashrc
;; to elisp script
;;
;; am0c <am0c@perl.kr> http://twitter.com/am0c
;;
(require 'cl)
(defmacro get-home-path () '(getenv "HOME"))
@am0c
am0c / gist:957508
Created May 5, 2011 17:47
android note
# pwd
/dev
# ls
adsp kmsg qmi1
akm8973_aot lightsensor qmi2
akm8973_daemon log radio_feedback
alarm msm_aac random
android_adb msm_audpre rfkill
android_adb_enable msm_camera smd0
ashmem msm_mp3 smd1