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 / slackbot.py
Created June 25, 2021 05:40
aws-sns-lambda-slcakbot-or-webhook
import urllib3
import json
import os
from datetime import datetime, timezone, timedelta
seoul = timezone(timedelta(hours=9) ,name="Asia/Seoul")
http = urllib3.PoolManager()
url = os.environ["SLACK_WEBHOOK_URL"]
slack_channel = os.environ["SLACK_CHANNEL"]
@tpdns90321
tpdns90321 / add_comment.py
Last active March 17, 2021 12:10
github actions 예제
import sys
import json
import re
import urllib.request
from bs4 import BeautifulSoup
NAME_RULE = r"(\d+)/\d+.py"
CLIENT_HEADER = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0'}
def search_solved_ac(problem):
@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 구분자 삭제
@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"
}
package SplitLineRe
import "regexp"
func SplitLineRe(raw string) []string{
return regexp.MustCompile("((\r)\n)").Split(raw,-1)
}
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)
@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");
}
@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 / 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 / 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);
}
}