Skip to content

Instantly share code, notes, and snippets.


KyoungDeok Kwon kkd927

View GitHub Profile
kkd927 /
Created Jan 19, 2018 — forked from albertbori/
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac


This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.


  • Mac OSX 10+
  • Administrator privileges
kkd927 /
Created Jan 15, 2018 — forked from benelog/
나선형배열 문제
package problems;
import static java.util.Arrays.*;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
import java.util.function.Consumer;
View gist:cdd35810e4c60c37838e6eca85ea416f
Run this command to install MG-CLI:
sudo apt-get update && wget -O minergate-cli.deb && sudo dpkg -i minergate-cli.deb
to start miner (4 cores for BCN) use this command:
minergate-cli -user <YOUR@EMAIL.KAPPA> -bcn 4
Feel free to send some of your earnings to me:
BTC (Don't attempt to send other coins to this address!): 17f77AYHsQbdsB1Q6BbqPahJ8ZrjFLYH2j
kkd927 /
Created Nov 30, 2017
람다와 인터섹션 타입을 이용한 동적인 기능확장법
import java.util.function.Consumer;
import java.util.function.Function;
* @see <a href="">토비의 봄 TV 4회 (2) Generics에서 와일드카드 활용법, 람다와 인터섹션 타입을 이용한 동적인 기능확장법</a>
public class IntersectionType {
interface Pair<T> {
T getFirst();
T getSecond();
View rest-assured-test.json
kkd927 / big_int.c
Created Oct 17, 2015
Structure for Big Integer
View big_int.c
struct BIG_INT {
unsigned char *ptr; // 저장 공간의 주소 저장
int size; // 저장 공간의 크기 저장
bool sign; // 부호 저장(true: 음수, false: 양수)
kkd927 / index.html.erb
Created Jun 25, 2015
Rails Ajax - index.html.erb
View index.html.erb
<div id="users">
<%= render @user %>
kkd927 / gist:1ba6c09f833c20260033
Created Sep 7, 2014
upload video with paperclip (reports_controller.rb)
View gist:1ba6c09f833c20260033
# POST /reports
# POST /reports.json
def create
@report =
respond_to do |format|
format.html { redirect_to @report, notice: 'Report was successfully created.' }
format.html { render action: 'new' }
View gist:ff374bde1d1949717a90
has_attached_file :video,
:path => ":rails_root/public/video/:id/:filename",
:url => "/video/:id/:filename",
:styles => {
:medium => { :geometry => "640x480", :format => 'mp4' },
:large => { :geometry => "1024x576", :format => 'mp4' },
:processors => [:ffmpeg, :qtfaststart]
validates_attachment_content_type :video, content_type: /\Avideo\/.*\Z/
kkd927 / gist:9716045798fa46bb80cf
Created Sep 2, 2014
Installing Sublime Text 2 on Linux (Ubuntu)
View gist:9716045798fa46bb80cf
$ sudo add-apt-repository ppa:webupd8team/sublime-text-2
$ sudo apt-get update
$ sudo apt-get install sublime-text