Skip to content

Instantly share code, notes, and snippets.

View hanpama's full-sized avatar
🎯
Focusing

Kyungil Choi hanpama

🎯
Focusing
View GitHub Profile
@hanpama
hanpama / async.js
Created April 25, 2017 01:24
Understanding javascript async-await
(async () => {
console.log(1);
console.log(await 2);
console.log(3);
})();
(async () => {
console.log('a');
console.log(await 'b');
console.log('c');
})();
import React, { PropTypes } from 'react';
export class AuthProvider extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
login(email, password) {
@hanpama
hanpama / export_layers.rb
Created February 22, 2017 07:40
Sketchup Layer Exporter
def export_layer(layer, export_dir)
model = Sketchup.active_model
model.active_layer = layer
model.layers.to_a.each do |e|
e.visible = e == layer
end
model.export(File.join(export_dir, layer.name + '.dae'), {
:edges => true,
})
@hanpama
hanpama / sites.json
Last active February 16, 2017 07:05
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
export REPOSITORIES=$HOME/Repositories
alias installStrapiV3='
npm uninstall strapi -g
npm cache clean -f
npm cache clear -f
sudo rm -rf /usr/local/bin/strapi
mkdir -p $REPOSITORIES
cd $REPOSITORIES
sudo rm -rf strapi
def ensureCompleteForm(s):
'''문자열 안의 조합형 한글 부분을 완성형으로 바꾸기'''
i = 0
while i+1 < len(s):
b1 = ord(s[i])
b2 = ord(s[i+1])
print(str.join('\t', [c for c in s]))
print('\t' * i + '@')
set-option -g default-shell /usr/local/bin/fish
set-window-option -g mode-keys vi
set -sg escape-time 0
set-option -g status-position top
set -g status-bg colour65
set -g status-fg colour154
set -g default-terminal "screen-256color"
@hanpama
hanpama / Shortcuts.plist
Created May 19, 2016 13:02
SketchUp shortcut settings
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string> </string>
<integer>0</integer>
<string>selectSelectionTool:</string>
<string>g</string>
<integer>0</integer>
<string>makeComponent:</string>
@hanpama
hanpama / install_anaconda.sh
Last active February 22, 2016 08:32
Anaconda Installation
# 파이썬 아나콘다 배포판 설치
cd /tmp
wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda3-2.3.0-Linux-x86_64.sh
chmod +x Anaconda3-2.3.0-Linux-x86_64.sh
sudo bash Anaconda3-2.3.0-Linux-x86_64.sh -b -p ${HOME}/anaconda
echo PATH="${HOME}/anaconda/bin:\$PATH" >> ${HOME}/.profile
export PATH="${HOME}/anaconda/bin:$PATH"
pip install --upgrade pip