Skip to content

Instantly share code, notes, and snippets.

View hsnks100's full-sized avatar
๐Ÿ˜
wow

Han Gyoung-Su hsnks100

๐Ÿ˜
wow
View GitHub Profile
@hsnks100
hsnks100 / tcpdump
Last active February 20, 2021 17:06
๊ณ ๊ฐ๊ฒ€์ฆ์šฉ ์Šคํฌ๋ฆฝํŠธ๋“ค
port ์ฑ„ํŒ… ํฌํŠธ
host ๊ณ ๊ฐ ์•„์ดํ”ผ
sudo tcpdump dst host 175.123.88.191 -X -w /tmp/pktdump.pcap
@hsnks100
hsnks100 / gcc emacs on centos7
Last active January 31, 2021 18:58
emacs 25 on centos6
sudo yum install devtoolset-9-gcc devtoolset-9-libgccjit-devel libcurses-devel -y
git clone https://git.savannah.gnu.org/git/emacs.git
cd emacs
git fetch --all
git checkout -b native-comp origin/feature/native-comp
source scl_source enable devtoolset-9
./autogen.sh
./configure --with-nativecom --without-makeinfo
make -j8
sudo make install
@hsnks100
hsnks100 / request_url.cpp
Created August 19, 2020 08:19
libcurl request http page codes.
#include "request_url.h"
extern "C" {
#include<curl/curl.h>
}
// - - - - - - - - - - - - - - - - - - - -
#include<iostream>
static s
@hsnks100
hsnks100 / .bashrc
Last active December 20, 2022 03:43
๊ฐœ๋ฐœํ™˜๊ฒฝ์— ํ•„์š”ํ•œ ์Šคํฌ๋ฆฝํŠธ ๋ชจ์Œ
source scl_source enable devtoolset-7
set -o vi
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1='\[\e[0;36m\]\u\[\e[0m\]@\[\e[0;33m\]\h\[\e[0m\]$(parse_git_branch)\[\e[0;35m\]
{"lastUpload":"2019-12-09T16:25:02.052Z","extensionVersion":"v3.4.3"}
@hsnks100
hsnks100 / README.md
Created November 20, 2019 22:36
simple-peer real world example

node ws.js

python -m SimpleHTTPServer

// ChildView.cpp : CChildView ํด๋ž˜์Šค์˜ ๊ตฌํ˜„
//
#include "stdafx.h"
#include "SearchM.h"
#include "ChildView.h"
#include "OpenDlg.h"
#include "FindDlg.h"
#include "ValueDlg.h"
#pragma once
#include "stdafx.h"
class Packer
{
public:
Packer() {fileBuf = NULL;}
DWORD RVA2RAW(DWORD rva)
{
@hsnks100
hsnks100 / WEBRTC๋ฌธ์„œ.md
Last active December 5, 2018 00:29
WEBRTC๋ฌธ์„œ

WEBRTC 2์ฐจ ๋ฌธ์„œ

์—ฌ๊ธฐ์„œ๋Š” ์‹ค์ œ turn, stun ๋“ฑ์˜ ์‹œ๊ทธ๋„๋ง๊ณผ ์‹ค์ œ ํ™”์ƒํ†ต์‹ ์— ๋Œ€ํ•œ ๊ฒƒ์„ ์ •๋ฆฌํ•˜๋Š” ๋‚ด์šฉ์„ ๋‹ค๋ฃฌ๋‹ค.

WEBRTC Signaling ๊ฐœ๋…

WEBRTC ๋Š” p2p ํ†ต์‹ ์„ ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์ „์— ๋ฏธ๋ฆฌ sdp ๋‚˜ turn ์„œ๋ฒ„๋ฅผ ์„œ๋กœ ์•Œ๊ณ  ์žˆ์–ด์•ผ ํ•œ๋‹ค.

์–ด๋– ํ•œ ํ…์ŠคํŠธ ์ •๋ณด๋ฅผ ์ „๋‹ฌํ•  ์ˆ˜ ์žˆ๋Š” ํ†ต์‹ ์ˆ˜๋‹จ(์˜ˆ: ์†Œ์ผ“, ์›น์†Œ์ผ“ ๋“ฑ)์˜ ์ข…๋ฅ˜๋Š” ์–ด๋–ค๊ฒƒ์ด๋ผ๋„ ์ƒ๊ด€์—†๋‹ค.

์—ฌ๊ธฐ์„œ๋Š” websocket ์„ ์‚ฌ์šฉํ–ˆ๋‹ค.

@hsnks100
hsnks100 / a.java
Created December 3, 2018 08:37
์กฐ์ข… ํŠœ๋‹ ์˜ค๋ฆฌ์ง€๋„ ๋ฒ„์ „
ublic void onValueChanged(int angle, int power, int direction) {
// TODO Auto-generated method stub
JSONObject json1 = new JSONObject();
float left = 10000, right = 10000;
try {
if(power == 0) {
json1.put("left", 0);
json1.put("right", 0);
}