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 {