Skip to content

Instantly share code, notes, and snippets.

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

Hyungsuk Hong aanoaa

💭
💩 💩 💩
View GitHub Profile
linters:
fast: true
enable:
## https://golangci-lint.run/usage/linters/#enabled-by-default
- errcheck # checks unchecked errors
- gosimple # simplify code
- govet # examines Go source code and reports suspicious constructs
- ineffassign # detect unused assign
- staticcheck # cover Go vet edge cases
- typecheck # type-checks Go code
@aanoaa
aanoaa / product.js
Last active December 11, 2019 05:25
import React from "react"
import { graphql } from "gatsby"
import Layout from "../components/layout"
import SEO from "../components/seo"
const Product = ({ data }) => (
<Layout>
<SEO title={data.wordpressWpProduct.title} />
<h1>{data.wordpressWpProduct.edges[0].title}</h1>

hdiutil

case-sensitive 한 file system disk image 를 만들고, 이를 mount 해서 사용

root 권한이 필요없음

# reference: man hdiutil
# hdiutil -- manipulate disk images (attach, verify, create, etc)
# create <size_spec> <image>

create a new image of the given size or from the provided data. If image already

@aanoaa
aanoaa / google-calendar.pl
Created July 29, 2015 09:26
google calendar quickAdd
use strict;
use warnings;
use Crypt::OpenSSL::RSA ();
use HTTP::Tiny;
use JSON;
use MIME::Base64 'encode_base64url';
use Path::Tiny;
sub encode_jwt {
## role, priv and scope ##
- role: 역할
- priv: 권한
- scope: 범위
`staff` 는 `사용자정보열람` 이 가능하다.
`aanoaa` 는 `staff` 이다.
`aanoaa` 는 `사용자정보열람` 을 할 수 있다.
oops
#!/usr/bin/env perl
my @content = split /\n/, join '', <DATA>;
print $content[int(rand(scalar @content))], "\n";
__DATA__
de-misunderestimating
XUPPERNAMEX, WE WENT OVER THIS. EXPANDTAB.
XUPPERNAMEX, WE WENT OVER THIS. C++ IO SUCKS.
Some shit.
add actual words
I CAN HAZ COMMENTZ.
# https://github.com/kraih/mojo/blob/master/.perltidyrc
-pbp # Start with Perl Best Practices
-w # Show all warnings
-iob # Ignore old breakpoints
-l=79 # 79 characters per line
-mbl=2 # No more than 2 blank lines
-i=4 # Indentation is 4 columns
-ci=4 # Continuation indentation is 4 columns
-vt=0 # Less vertical tightness
-sbt=2 # High square bracket tightness
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
color-theme-solarized-20130307.1350
erc-hl-nicks-20130114.1648
@aanoaa
aanoaa / a.el
Created December 3, 2013 12:38
(setenv "PERL5LIB" (concat "./lib:" (getenv "PERL5LIB")))
(setenv "PATH" (concat (getenv "HOME") "/.plenv/shims:" (getenv "HOME") "/.plenv/bin:" (getenv "PATH")))
(setq exec-path (cons (concat (getenv "HOME") "/.plenv/shims") (cons (concat (getenv "HOME") "/.plenv/bin") exec-path)))
(require 'plenv) ; <M-x> package-install plenv
(plenv-global "5.18.1")
(defun flymake-perl-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-with-folder-structure))
(local-file (file-relative-name