Skip to content

Instantly share code, notes, and snippets.

View doortts's full-sized avatar

Suwon Chae doortts

  • South Korea
View GitHub Profile
@riccardo-felipe
riccardo-felipe / gist:aa2a61b768d6cc07adabc57991032316
Last active September 30, 2018 09:26 — forked from psayre23/gist:c30a821239f4818b0709
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array
@metafeather
metafeather / main.go
Created April 27, 2017 13:06
Get goroutine id for debugging
# ref: https://play.golang.org/p/OeEmT_CXyO
package main
import (
"fmt"
"runtime"
"strconv"
"strings"
"sync"
)
@redism
redism / kr_won_to_backquote.sh
Created April 26, 2017 16:20
macOS Sierra에서 원화(₩) 대신 백 쿼트(`) 입력하기
#!/bin/bash
if [ -f ~/Library/KeyBindings/DefaultkeyBinding.dict ]; then
echo "~/Library/KeyBindings/DefaultkeyBinding.dict already exists"
exit -1
fi
mkdir -p ~/Library/KeyBindings
cat << EOF > ~/Library/KeyBindings/DefaultkeyBinding.dict
{
"₩" = ("insertText:", "\`");
@oh-ren
oh-ren / jquery.pjax.js
Last active February 28, 2024 06:20
pjax hacked, so it works with jQuery 3.0
/*!
* Copyright 2012, Chris Wanstrath
* Released under the MIT License
* https://github.com/defunkt/jquery-pjax
*/
(function($){
// When called on a container with a selector, fetches the href with
// ajax into the container or with the data-pjax attribute on the link
@MinCha
MinCha / gist:3416246
Created August 21, 2012 14:57
Favorite Java GC Options
-server
-XX:-UseAdaptiveSizePolicy
-XX:ParallelGCThreads=2
-XX:+UseParNewGC
-XX:NewRatio=3
-XX:+PrintGCDetails -XX:+PrintHeapAtGC
-XX:+HeapDumpOnOutOfMemoryError