Skip to content

Instantly share code, notes, and snippets.

@suya55
suya55 / git-clean-branches.sh
Last active Feb 13, 2019 — forked from asit-dhal/git-clean-local-branches
오래된 브랜치를 지우기 위한 스크립트. master, develop,HEAD은 제외됨. 자세한건 -h 로 확인.
View git-clean-branches.sh
#!/bin/bash
#
# Copyright(c) 2018 Asit Dhal.
# Distributed under the MIT License (http://opensource.org/licenses/MIT)
#
LIGHT_BLUE='\033[1;34m'
COLOR_YELLOW='\e[1;33m'
COLOR_CYAN='\e[0;36m'
COLOR_PURPLE='\e[0;35m'
@suya55
suya55 / nokogiri_install
Created Aug 1, 2018 — forked from sobstel/nokogiri_install
nokogiri -> ERROR: cannot discover where libxml2 is located on your system
View nokogiri_install
# `ERROR: Error installing nokogiri:
# ERROR: Failed to build gem native extension.
#
# current directory: /usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.7.0/ext/nokogiri
# /usr/local/var/rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170103-68488-r71c9j.rb extconf.rb --with-xml=/usr/local/Cellar/libxml2/ --use-system-libraries
# checking if the C compiler accepts ... yes
# checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
# Building nokogiri using system libraries.
# ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed.
# *** extconf.rb failed ***
View test.rake
require 'open3'
namespace :test do
rule '' do |t|
# rake test:league
if /test:(.*)(:([^.]+))?$/.match(t.name)
arguments = t.name.split(':')[1..-1]
file_name = arguments.first
path = Dir["spec/**/*#{file_name}*_spec.rb"].join(' ')
unless path.strip.empty?
View gist:557cffcf97d1cb55cf3cec47e5ba1c9b
curl -#LO https://rvm.io/mpapis.asc
gpg --import mpapis.asc
curl -sSL https://get.rvm.io | bash -s stable --rails
source /usr/local/rvm/scripts/rvm
View resume.md

김 성 수

WORK EXPERIENCE

카카오

  • 부서 : 게임사업부, 카카오톡부문, AI서비스개발
  • 근무 기간 : 2013년 4월 ~ 재직중
@suya55
suya55 / HttpClientURIUtil.java
Created Apr 6, 2018 — forked from agentgt/HttpClientURIUtil.java
Commons Httpclient Encoding tools that are missing from Commons Http Components
View HttpClientURIUtil.java
package com.snaphop.util;
/*
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/util/URIUtil.java,v 1.27 2004/05/05 20:34:01 olegk Exp $
* $Revision: 507321 $
* $Date: 2007-02-14 01:10:51 +0100 (Wed, 14 Feb 2007) $
*
* ====================================================================
*
@suya55
suya55 / customize_error_with_bootstrap.rb
Last active Mar 15, 2018 — forked from andreimoment/customize_error.rb
Customize Field Errors with Rails 5 and Bootstrap
View customize_error_with_bootstrap.rb
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
html = ''
form_fields = %w(textarea input select)
tag_elements = Nokogiri::HTML::DocumentFragment.parse(html_tag).css "label, " + form_fields.join(', ')
tag_elements.each do |e|
if e.node_name.eql? 'label'
html = %(#{e}).html_safe
elsif form_fields.include? e.node_name
@suya55
suya55 / application.conf
Created Nov 3, 2017
wsClient 설정 참고.
View application.conf
# Configuratino for Play ws
play.ws {
timeout {
# If non null, the connection timeout, this is how long to wait for a TCP connection to be made
connection = 10 seconds
# If non null, the idle timeout, this is how long to wait for any IO activity from the remote host
# while making a request
idle = 10 seconds
# If non null, the request timeout, this is the maximum amount of time to wait for the whole request
request = 10 seconds
@suya55
suya55 / active_record.rb
Created Jan 20, 2017
create_on_duplicate_key_update
View active_record.rb
module ActiveRecord
# = Active Record Persistence
module Persistence
extend ActiveSupport::Concern
def create_on_duplicate_key_update!(keys)
#keys = duplicate_keys.is_a? Array ? duplicate_keys : [duplicate_keys] #TODO: 배열이 아닐때? 코드짜기.
keys.collect! { |k| k.to_s }
klass = self.class
attributes_with_values = arel_attributes_with_values_for_create(attribute_names)
@suya55
suya55 / biggest_files.sh
Created May 19, 2016
display 10 biggest open files
View biggest_files.sh
lsof / | awk '{ if($7 > 1048576) print $7/1048576 "MB "$9 }' | sort -n -u | tail
You can’t perform that action at this time.