Skip to content

Instantly share code, notes, and snippets.

View rurumimic's full-sized avatar
♟️
턴제코딩

rurumimic

♟️
턴제코딩
View GitHub Profile
@rurumimic
rurumimic / Python.md
Created February 2, 2018 07:29
Setup Python Environment

파이썬 환경 설정

  1. python3, pip, pyenv, virtualenv, autoenv, elpy
  2. django
  3. python emacs editor
@rurumimic
rurumimic / Customizine Bash.md
Last active February 2, 2018 08:14
Customize Bash

username@host:pwd$

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
@rurumimic
rurumimic / Wind Move.md
Created February 2, 2018 08:28
Emacs Wind Move

.emacs.d/init.el

(when (fboundp 'windmove-default-keybindings)
  (windmove-default-keybindings))
  
(windmove-default-keybindings 'meta)

(global-set-key (kbd "C-c <left>")  'windmove-left)
(global-set-key (kbd "C-c ") 'windmove-right)
@rurumimic
rurumimic / Go.md
Last active February 5, 2018 02:03
Setup Golang

Go

다운로드 페이지

Go 설치

$ cd ~
$ wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz
$ sudo tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
@rurumimic
rurumimic / JAVA_HOME.md
Created April 9, 2018 03:01
Fucking JAVA
$ echo $JAVA_HOME
$ javac -version

javac 1.8.0_161

$ which javac

/usr/bin/javac
@rurumimic
rurumimic / CentOS Daum.repo.md
Last active April 12, 2018 07:24
CentOS Repo kakao mirror

Backup original repo

$ bzip2 /etc/yum.repos.d/CentOS-*.repo
$ yum repolist
$ ll /etc/yum.repos.d/

Add Kakao.repo

@rurumimic
rurumimic / Board.swift
Created September 14, 2018 13:30
보드 만지기
import Foundation
struct board<T> {
let w: Int
let h: Int
var board: [T]
init(w: Int, h: Int, v: T) {
self.w = w
self.h = h
self.board = [T].init(repeating: v, count: w*h)
@rurumimic
rurumimic / String.swift
Created September 14, 2018 13:29
String 만지기
import Foundation
let s = "Hello, World!"
print(s)
// string -> string array
var a = s.map { String($0) }
print(a)
// string array -> string
@rurumimic
rurumimic / HeapSort.swift
Created September 14, 2018 13:33
Heap Sort
import Foundation
var A = [4, 10, 14, 7, 9, 3, 2, 8, 1, 16]
func left(_ i: Int) -> Int {
return i * 2 + 1
}
func right(_ i: Int) -> Int {
return i * 2 + 1 + 1
@rurumimic
rurumimic / Ascii.swift
Last active September 14, 2018 13:45
Ascii
extension String {
var ascii: Int {
return Int(unicodeScalars.first!.value)
}
}
extension Int {
var toString: String {
return String(UnicodeScalar(self)!)
}
}