Skip to content

Instantly share code, notes, and snippets.

View ainvyu's full-sized avatar
🔥
Beating burnout

Yongjin Jung ainvyu

🔥
Beating burnout
  • Samsung Electronics
  • Korea, Republic of
View GitHub Profile
@ainvyu
ainvyu / gist:879613
Created March 21, 2011 15:22
imaso login
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use WWW::Mechanize;
my %login_info = (ID1 => 'password',
ID2 => 'password',);
@ainvyu
ainvyu / gist:970866
Created May 13, 2011 16:49
Encoding to utf8
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use File::Slurp;
use Encode;
for my $file (<*.cpp>) {
my $data = read_file($file);
@ainvyu
ainvyu / gist:1882996
Created February 22, 2012 07:21
perlbrew
PERLBREW_PERL="perl-5.14.2"
10 0 * * * envi PATH="$HOME/perl5/perlbrew/perls/$PERLBREW_PERL/bin:$PATH" /usr/bin/env perl /some/script_path
Checking for ssl via pkg-config...no
auto.def:77 missing close-bracket
in expression "[check-for-openssl $msg..."
missing close-bracket
in expression "[check-for-openssl $msg..."
(parsing expression "[check-for-openssl $ms...")
invoked from within
"if {[check-for-openssl $msg "$cflags $ldflags"} {
incr found
break
Index: auto.def
===================================================================
--- auto.def
+++ auto.def
@@ -96,11 +96,11 @@
} else {
set msg "ssl in $dir"
set cflags "-I$dir/include"
set ldflags "-L$dir/include"
}
@ainvyu
ainvyu / gist:4286141
Created December 14, 2012 15:12
Fucking CPS
exports.basket_section_add = function(req, res) {
var basket_number = req.session.basket_number;
var category1 = req.body.category1;
var category2 = req.body.category2;
var category3 = req.body.category3;
console.log(basket_number);
dbconn.query("SELECT product_number FROM product WHERE category3=$1", [ category3 ], db.after( function (results) {
var selected_product_number = results.rows[0].product_number;
@ainvyu
ainvyu / gist:5523460
Created May 6, 2013 05:03
nginx 컴파일 옵션

Install dependencies

sudo apt-get install libpcre3-dev zlib1g-dev libgd2-xpm-dev libssl-dev

Configure and make

./configure \
--prefix=/usr/local/stow/nginx \
--conf-path=/etc/nginx/nginx.conf \

--sbin-path=/usr/sbin \

async.waterfall([
function(callback){
callback(null, 'one', 'two');
},
function(arg1, arg2, callback){
callback(null, 'three');
},
function(arg1, callback){
// arg1 now equals 'three'
callback(null, 'done');
1. 명령어 프롬프트를 연다.
2. diskpart를 입력하고 엔터
3. diskpart에 들어가서
list disk (여기서 USB 메모리의 파티션 번호를 확인한다.)
select disk 1 (위에서 확인한 번호를 넣는다.)
clean
create partition primary
select partition 1
active
@ainvyu
ainvyu / gdm_downloader_with_coro.pl
Created September 29, 2013 18:25
Game Developer Magazine Digital Edition Archives downloader
#!/usr/bin/env perl
use common::sense;
use Web::Query;
use Readonly;
use Coro;
use Coro::LWP;
use Coro::Semaphore;
use WWW::Mechanize;