Skip to content

Instantly share code, notes, and snippets.

View tpdns90321's full-sized avatar

kang tpdns90321

  • Korean, gimpo city, geongido
View GitHub Profile
@tpdns90321
tpdns90321 / bluetooth.py
Last active August 29, 2015 14:13 — forked from tito/bluetooth.py
'''
Bluetooth/Pyjnius example
=========================
This was used to send some bytes to an arduino via bluetooth.
The app must have BLUETOOTH and BLUETOOTH_ADMIN permissions (well, i didn't
tested without BLUETOOTH_ADMIN, maybe it works.)
Connect your device to your phone, via the bluetooth menu. After the
pairing is done, you'll be able to use it in the app.
@tpdns90321
tpdns90321 / OpenGL_SDL2_test.cpp
Created February 11, 2015 04:43
SDL2_Opengl Example
#include<SDL2/SDL.h>
#include<SDL2/SDL_opengl.h>
#include<GL/glut.h>
int main(){
//Create window
SDL_Window *window = SDL_CreateWindow("Test",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,640,480,SDL_WINDOW_OPENGL);
//OpenGL Init
SDL_GLContext context = SDL_GL_CreateContext(window);
glMatrixMode(GL_MODELVIEW);
@tpdns90321
tpdns90321 / FuncAB.cs
Last active April 12, 2016 05:28
C# Thread Example
using System;
using System.Threading;
namespace FuncAB{
class Program{
static void FuncA(){
for (int i = 0; i < 100; i++){
Console.WriteLine("A : " + i);
}
}
@tpdns90321
tpdns90321 / FuncAStop.cs
Last active April 12, 2016 06:43
C# Thread Example
using System;
using System.Threading;
namespace FuncAStop{
class Program{
static Thread A;
static Thread B;
static void FuncA(){
for (int i = 0; i < 100; i++){
@tpdns90321
tpdns90321 / FuncASuspendResum.cs
Last active April 12, 2016 07:25
C# Thread Example
using System;
using System.Threading;
namespace FuncASuspendResum{
class Program{
static Thread A;
static Thread B;
static void FuncA(){
A.Suspend();
@tpdns90321
tpdns90321 / FuncSleep.cs
Last active April 12, 2016 10:11
C# Thread Example
using System;
using System.Threading;
namespace FuncSleep{
class Program{
void FuncA(){
System.Threading.Sleep(1000);
Console.WriteLine("Hello, World");
}
package SplitLine
func SplitLine(raw string) (lines []string){
lines = make([]string,1)
temp := ""
for _,ch := range raw{
if ch == '\r'{
continue
}else if ch == '\n'{
lines = append(lines,temp)
package SplitLineRe
import "regexp"
func SplitLineRe(raw string) []string{
return regexp.MustCompile("((\r)\n)").Split(raw,-1)
}
@tpdns90321
tpdns90321 / bootstrap.go
Created September 20, 2016 07:01
Just Fun and I just used private.
package main
func BootstrapTemplate() string {
jquery := "<script src=\"https://code.jquery.com/jquery-3.1.0.min.js\" integrity=\"sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=\" crossorigin=\"anonymous\"></script>"
css := "<link href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u\" crossorigin=\"anonymous\">"
option := "<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css\" integrity=\"sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp\" crossorigin=\"anonymous\">"
script := "<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\" integrity=\"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa\" crossorigin=\"anonymous\"></script>"
return jquery + "\n" + css + "\n" + option + "\n" + script + "\n"
}
@tpdns90321
tpdns90321 / fakeDaumgameStarter.py
Created July 27, 2020 02:58
fakeDaumgameStarter -- running POE for kakao in linux wine
#!/usr/bin/python3
import sys
import os
import subprocess
POE_PATH = "drive_c/Daum Games/Path of Exile/"
POE_CLIENT_PATH = POE_PATH + "PathOfExile_KG.exe"
def parseURL(url):
# URL 구분자 삭제