Skip to content

Instantly share code, notes, and snippets.

View junho85's full-sized avatar
💭
Working

JunHo Kim (김준호) junho85

💭
Working
View GitHub Profile
@junho85
junho85 / .inputrc
Created February 12, 2018 02:16
.inputrc
"\e\e[D": backward-word
"\e\e[C": forward-word
@junho85
junho85 / .tmux.conf
Last active November 15, 2018 07:46
tmux.conf for v2.6
set -g mouse on
setw -g mode-keys vi
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
@junho85
junho85 / git_alias.sh
Created November 22, 2017 06:24
git alias
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
@junho85
junho85 / lmtp.py
Created September 26, 2017 15:19
python lmtp sendmail
import smtplib
host = "junho85.pe.kr"
port = 2525
fromaddr = "abc@test.com"
toaddr = "sometest@daum.net"
lmtp = smtplib.LMTP(host, port)
lmtp.set_debuglevel(1)
@junho85
junho85 / post_request.pl
Last active January 4, 2024 04:43
perl post request using HTTP::Tiny
use HTTP::Tiny;
use JSON;
my $ua = HTTP::Tiny->new();
my $somehash->{"somekey"} = {
ip => "111.111.111.111"
};
my $url = "http://testurl.com:8080/api/test";
@junho85
junho85 / keypad_sr_hc04.ino
Last active August 5, 2017 04:25
keypad_sr_hc04.ino
#include <LiquidCrystal.h>
// HC-SR04 pins
int trigPin = 12;
int echoPin = 13;
// Keypad Shield LCD
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
void setup() {
@junho85
junho85 / ultrasonic-lib-hc-sr04.ino
Created August 3, 2017 02:06
ultrasonic-lib-hc-sr04.ino
#include <Ultrasonic.h>
Ultrasonic ultrasonic(12, 13);
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.print("Distance in CM: ");
@junho85
junho85 / ultrasonic-hc-sr04.ino
Last active August 3, 2017 02:01
ultrasonic-hc-sr04.ino
//초음파 센서의 핀번호를 설정한다.
int trigPin = 12;
int echoPin = 13;
void setup() {
Serial.begin(9600);
// trig를 출력모드로 설정, echo를 입력모드로 설정
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}
@junho85
junho85 / lcd_keypad_move.ino
Created August 2, 2017 15:29
lcd_keypad_move.ino
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); // for lcd keypad shield
#define btnRIGHT 0
#define btnUP 1
#define btnDOWN 2
#define btnLEFT 3
#define btnSELECT 4
#define btnNONE 5
@junho85
junho85 / LCD_Game.ino
Created August 2, 2017 14:55 — forked from dadecoza/LCD_Game.ino
Side scrolling one button jump game for the Arduino LCD Keypad shield.
/* Modified slightly to work with the LCD Keypad Shield.
* Original - http://www.instructables.com/id/Arduino-LCD-Game/
*/
#include <LiquidCrystal.h>
#define SPRITE_RUN1 1
#define SPRITE_RUN2 2
#define SPRITE_JUMP 3
#define SPRITE_JUMP_UPPER '.' // Use the '.' character for the head
#define SPRITE_JUMP_LOWER 4