Skip to content

Instantly share code, notes, and snippets.

View aanoaa's full-sized avatar
💭
💩 💩 💩

Hyungsuk Hong aanoaa

💭
💩 💩 💩
View GitHub Profile
@aanoaa
aanoaa / a.md
Created December 1, 2013 13:08

'자기소개-서론-본론-마무리' 형식을 지키면 됩니다.

emacs 에서의 cperl-mode 와 flymake

flymake 가 뭐냐면, 편집하고 있는 버퍼의 파일을 컴파일하고 에러를 현재 버퍼에 표시해주는 emacs 의 유용한 도구 입니다.

@aanoaa
aanoaa / a.el
Created November 29, 2013 09:33
(defalias 'perl-mode 'cperl-mode)
(add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\|psgi\\|t\\)\\'" . cperl-mode))
(add-hook 'css-mode-hook 'rainbow-mode)
(add-hook 'scss-mode-hook 'rainbow-mode)
+----+-----------+
| id | name |
+----+-----------+
| 1 | Jacket |
| 2 | Pants |
| 3 | Shirts |
| 4 | Shoes |
| 5 | Hat |
| 6 | Tie |
| 7 | Waistcoat |
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Makes "field" required and between 13 and 23.</title>
<link rel="stylesheet" href="http://jquery.bassistance.de/validate/demo/site-demos.css">
</head>
<body>
<form id="myform">
<label for="field">Required, minium 13, maximum 23:</label>
@aanoaa
aanoaa / a.md
Created September 11, 2013 07:02
    $('#mandatory li').each (i, el) ->
      mandatory = $(el).text().split(':')
      if mandatory[1] is "YES"
        console.log mandatory unless $("input[name=#{mandatory[0]}]")
        $("input[name=#{mandatory[0]}]").closest('.control-group').find('label:first-child')
          .css { color : 'red' }
use Plack::Request;
use File::Slurp qw/write_file slurp/;
my $app = sub {
my $req = Plack::Request->new(shift);
my $input = $req->body; # `psgi.input` handle
my $len = 1024 * 8;
my $offset = 0;
#!/usr/bin/env perl
use strict;
use warnings;
use HTTP::Tiny;
use Path::Tiny;
use Try::Tiny;
use MIME::Base64;

OAuth2

INTRODUCTION

CLIENT-SERVER 모델에서는 외부 application 이 서버의 제한된 리소스에 접근하려고 할때에 몇가지 문제가 있습니다.

  • 사용자의 password 가 application 에 노출됩니다.(clear-text 로)
  • application 은 사용자의 모든 권한을 얻게 됩니다.
  • 특정 application 의 접근 권한을 취소 할 수 없습니다.
@aanoaa
aanoaa / app.psgi
Created July 26, 2013 10:04
serving static files Mojolicious::Lite with Plack
use strict;
use warnings;
use Plack::Builder;
use Plack::App::File;
my $app = require "bin/oauth";
my $static = Plack::App::File->new(root => "./assets")->to_app;
builder {
use strict;
use warnings;
use Plack::Builder;
use Plack::App::File;
my $app = require "bin/oauth";
my $static = Plack::App::File->new(root => "./assets")->to_app;
builder {