Skip to content

Instantly share code, notes, and snippets.

View not-for-me's full-sized avatar
☺️
Fun coding time!

Woojin.joe not-for-me

☺️
Fun coding time!
View GitHub Profile
@not-for-me
not-for-me / window.md
Last active October 3, 2019 16:53
윈도우 10 초기화 후 하는 일

윈도우 10 초기화 후 하는 일

  1. chcolatey 설치
  2. 기본 앱 제거 스카이프 : Get-AppxPackage skypeapp | Remove-AppxPackage 앱스토어 : Get-AppxPackage windowsstore | Remove-AppxPackage 윈도우폰 : Get-AppxPackage windowsphone | Remove-AppxPackage 3D빌더 : Get-AppxPackage 3dbuilder | Remove-AppxPackage 알람 앤 클락 : Get-AppxPackage windowsalarms | Remove-AppxPackage 계산기 : Get-AppxPackage windowscalculator | Remove-AppxPackage
@not-for-me
not-for-me / my-bean.xml
Created August 21, 2019 08:47
my-bean.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
">
<bean id="pb" class="java.lang.ProcessBuilder">
<constructor-arg value="ls -al" />
<property name="whatever" value="#{ pb.start() }"/>
</bean>
@not-for-me
not-for-me / noprefix.kt
Created January 20, 2019 14:16
Hacker Rank: No Prefix Set
import java.util.*
// https://www.hackerrank.com/challenges/no-prefix-set/problem
data class TrieNode(
val c: Char = '-',
var cnt: Int = 0,
var isLeaf: Boolean = false,
val children: MutableMap<Char, TrieNode> = HashMap()
)
fun insert(root: TrieNode, keyword: String): Boolean {
@not-for-me
not-for-me / ab_test.sh
Created November 30, 2018 03:08
Simple ab test
#!/bin/sh
ARG=($@)
arg_count=${#ARG[@]}
if [[ $arg_count -lt 4 ]]; then
echo "Usage: $0 loopCount (ab -n opt param) (ab -c opt param) url" >&2
exit 1
fi
loop=${ARG[0]}
num=${ARG[1]}
@not-for-me
not-for-me / reuse_agent.sh
Created July 9, 2018 06:35 — forked from MarkRose/reuse_agent.sh
Reuse existing ssh-agent or start a new one
# Reuse an existing ssh-agent on login, or create a new one. Append this to your .bashrc
# I have no idea who the author of the original concept was for reusing agents. This
# version also handles the case where the agent exists but has no keys.
GOT_AGENT=0
for FILE in $(find /tmp/ssh-* -type s -user ${LOGNAME} -name "agent.[0-9]*" 2>/dev/null)
do
SOCK_PID=${FILE##*.}
@not-for-me
not-for-me / .bashrc
Created February 20, 2018 02:21 — forked from vsouza/.bashrc
Golang 1.5 setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@not-for-me
not-for-me / LookAndSay.kt
Last active June 22, 2017 08:48
Simple LookAndSay Algorithm
// 0 is the first line from the lookAndSay result.
fun ant(line: Int): String {
var resultString = "1"
var lineCounter = line
while (lineCounter-- > 0) {
var tempBuffer = StringBuilder()
var curCompareChar = resultString[0]
var curCnt = 1
for (idx in 1..resultString.length - 1) {
@not-for-me
not-for-me / install.sh
Created February 24, 2017 01:37 — forked from mshick/install.sh
Installing Node.js with Homebrew and nvm
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install nvm
brew install nvm
# Export nvm environment
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"