Skip to content

Instantly share code, notes, and snippets.

View red1004g's full-sized avatar
๐ŸŽฏ
Focusing

chobbang red1004g

๐ŸŽฏ
Focusing
View GitHub Profile
@red1004g
red1004g / gist:9eb02394b6b7830521512730fe3219fe
Last active August 22, 2017 06:58
ec2 + ubuntu + python + scrapy
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
# install pyenv
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils
# pyenv installer
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
@red1004g
red1004g / hprof ์ถ”์ถœ
Created March 4, 2016 03:08
Android stuido์—์„œ eclipse MAT๋ฅผ ๋ณด๊ธฐ ์œ„ํ•œ converted-heap ์ถ”์ถœ ๋ฐฉ๋ฒ•
1. Click "inital GC" in memory tab
2. Click "Dump java heap" in memory tab
3. Tab dumped screen and "Copy path"(or press Shift + Command + C)
4. hprof-conv {copied_path}.hprof {wanted_path}/heap-converted.hprof
@red1004g
red1004g / all_in_one.txt
Last active May 27, 2023 11:36
brew + iTerm2 + theme + oh my zsh + git
# After Catalina
# Prerequisites
# Installed Chrome
# Installed iTerm2
# install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# xcode select(๋™์ž‘ ์•ˆํ•ด๋„, brew install ๋„์ค‘ ์ž๋™์œผ๋กœ ์„ค์น˜ ๋จ)
@red1004g
red1004g / gist:1813379
Created February 13, 2012 03:44
the function that valdate file type extension when uploading image
jQuery ($) ->
$('#gallery_photo').change ->
ext = $(@).val().split('.').pop().toLowerCase()
if $.inArray(ext, ['png','jpg','jpeg']) == -1
alert 'ํ™•์žฅ์ž๋Š” png, jpg, jpeg๋งŒ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค!'
return false
return true