Skip to content

Instantly share code, notes, and snippets.

View dsdstudio's full-sized avatar
🎹
Focusing

Bohyung kim dsdstudio

🎹
Focusing
View GitHub Profile
@andrwj
andrwj / set-cpu-limit-to-flash-player.sh
Last active January 1, 2016 13:18
set CPU limit to flash player!
#!/bin/bash
# A.J <andrwj@gmail.com>
# 2013-12-27
# v0.0.6
#
# set cpu limit to Flash player!
# default limit value: 30%
# usage:
# set-cpu-limit-to-flash-player.sh 50
#
@Couto
Couto / raspberrypi_archlinux.md
Last active August 27, 2017 17:06
Raspberry Pi with ArchLinux
@jongwonwoo
jongwonwoo / JWScrollStateMachine.swift
Created April 22, 2017 06:30
State Machine for scroll events
//
// JWScrollStateMachine.swift
// JWThumbnailsNavigation
//
// Created by Jongwon Woo on 26/03/2017.
// Copyright © 2017 CocoaPods. All rights reserved.
//
import UIKit
@fisherwebdev
fisherwebdev / React Lifecycle Methods
Created May 5, 2015 18:38
Cheatsheet for React lifecycle and update cycle methods
Lifecycle: | Update:
Mounting and Unmounting | New Props or State
--------------------------------+-----------------------------------
|
getDefaultProps() | componentWillReceiveProps()*
|
getInitialState() | shouldComponentUpdate()
|
componentWillMount() | componentWillUpdate()
|
@bipark
bipark / profile.md
Last active February 28, 2019 01:45

박병일 프로필

최근 갑작스럽게 직장을 사직하고 이제는 무엇을 해야 할지 시간을 갖고 고민을 해야지... 하다가 그동안 정신없이 살다보니 프로필을 쓴다거나 경력을 정리해 볼 생각을 별로 하지 않았구나 싶은 생각이 들어서 저의 프로필과 함께 제 생각들, 스타트업 CTO를 하면서 알게된 혹은 필요한 기술 정보들, 그리고 개인적인 프로필을 정리했습니다.

1. 이 글의 목적

오늘(2018년 6월 29일) 현재 아직 뚜렷한 계획이 없어서 프로필 문서의 명확한 목표를 만들기는 어렵지만 가족이 있고 공부하는 아이들이 있어서 돈을 버는 일이 우선은 목적이 될 것 같습니다. 당장은 취업의 목적 보다는 외주개발 쪽이 쉬운 접근인것 같아서 제가 할 수 있는 일, 했던 일, 그리고 알고 있는 것들을 정리해 봤습니다.

짧은 글에 많은 것을 담기는 어렵습니다만 저에 대한 정보 그리고 제가 알고 있고 해왔던 일에 대한 기록이 독자에게 도움이 되었으면 좋겠습니다. 혹시 글을 보시는 분 중에 외주 개발을 맡기기를 원하시거나 스타트업 기술 개발 관련 컨설팅이 필요하신 분은 연락 주세요. 아, 물론 좋은 회사가 있다면 언제든 만나볼 용의가 있습니다. 아래 이메일 혹은 페이스북에 친구 신청을 하시고 메시지를 보내 주시면 됩니다.

2. 연락처

@y-ken
y-ken / nginx.conf
Last active November 19, 2019 08:11
流れに乗ってnginxのログフォーマットにLTSVを採用しました。 2013/03/05リリースのfluentd-0.10.32.gemなら標準のin_tailで、format ltsvとする事でそのまま読み込めます。 proxy先からの応答時間や送出したcookieも記録する汎用的な設定です。
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format ltsv 'domain:$host\t'
'host:$remote_addr\t'
'user:$remote_user\t'
'time:$time_local\t'
'method:$request_method\t'
'path:$request_uri\t'
@schneems
schneems / gist:1705468
Created January 30, 2012 17:09
Receive GZIP params in Rails
def handle_gzip_params
# When the server receives a request with content-type "gzip/json" this will be called which will unzip it,
# and then parse it as json
# The use case is so clients such as Android or Iphone can zip their long request such as Inviters#addressbook emails
# Then the server can unpack the request and parse the parameters as normal.
if request.content_type == "gzip/json"
data = ActiveSupport::JSON.decode(ActiveSupport::Gzip.decompress(request.raw_post))
data = {:_json => data} unless data.is_a?(Hash)
params ||= {}
@benelog
benelog / springloaded.md
Last active May 12, 2021 09:04
springloaded

springloaded는 개발환경에서 .java클래스를 수정했을 때 변경된 클래스파일만을 재로딩하는 도구입니다. Local PC에서 수정과 Tomcat재시작을 줄이는데 도움이 됩니다.

다만 JRebel도 그러하듯이 모든 경우 완벽한 리로딩이 되지는 않습니다. 메서드추가,수정시에는 잘 반영됩니다. 그러나 아래와 같은 경우에는 자동반영이 되지 않습니다.

  • 상속구조의 변경
  • Reflection정보가 Cache된 것
  • XML설정 수정 (이 부분은 프레임워크 특화된 구현이 들어가지 않으면 당연히 어렵습니다.)

그래도 많은 경우 Tomcat재시작없이 개발을 이어갈 수 있다면 없는것보다는 생산성에 도움이 되리라 생각합니다.

@kh4zad
kh4zad / GZIPEncoding.swift
Last active September 16, 2021 06:27
GZIP encoding for Alamofire requests
import Alamofire
import Gzip // using https://github.com/1024jp/GzipSwift
public struct GZIPEncoding: ParameterEncoding {
public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest {
var request = try urlRequest.asURLRequest()
guard let parameters = parameters else { return request }
@ruseel
ruseel / aws-docker-high-tracffic-kernel.md
Last active January 7, 2022 05:42
AWS에서 docker를 쓸 때 high traffic server라면 이렇게

AWS에서 docker를 쓸 때 high traffic server라면 이렇게 하는 것이 좋겠다. amazon linux를 쓴다고 하자.

ulimit

ulimit를 올려주어야 한다. /etc/security/limit.conf 에서 고쳐주어도 docker에는 적용되지 않는다. limit.conf는 PAM을 통해서 로그인했을 때만 먹는 설정이라 그렇다. docker로 띄운 process의 pid를 찾고 cat /proc/<pid>/limits를 실행해서 보면 적용되었는지 아닌지 확실하게 알 수 있다. kernel에서 직접 그 프로세스에 어떤 ulimit이 적용되었는지 확인하는 방법이다.

그래서 /etc/sysconfig/docker 파일을 만들고 아래를 추가한다.