Skip to content

Instantly share code, notes, and snippets.

@DanielTimLee
DanielTimLee / 0_NGINX
Last active December 11, 2017 03:57
NGINX
NGINX conf and other logs.
@DanielTimLee
DanielTimLee / 0_Misc
Last active December 11, 2017 04:07
Misc
Misc
@DanielTimLee
DanielTimLee / 0_Linux Scripts
Last active February 9, 2019 17:20
Linux Scripts
Linux Scripts
Package Manager with pacapt
Cron Build by Travis
Automatic Daily Cron Build by Travis
@DanielTimLee
DanielTimLee / a.lua
Last active November 6, 2017 04:04
lapis importing with method
local lapisR = require "lapis.request"
local lapisH = require "lapis.html"
--
local ms = require("moonscript")
local c = ms.loadfile("kong.plugins.shepherd.views.layout")
local index = require("kong.plugins.shepherd.views.index")
@DanielTimLee
DanielTimLee / ble_scan.py
Created March 5, 2017 07:51
ble_scan.py
# bluetooth low energy scan
from bluetooth.ble import DiscoveryService
service = DiscoveryService()
devices = service.discover(2)
for address, name in devices.items():
print("name: {}, address: {}".format(name, address))
@DanielTimLee
DanielTimLee / ble_evt_log.h
Created February 28, 2017 12:20
ble_evt_log.h
char *ble_evt_enum[] = {
"BLE_EVT_INVALID", //0x00
"BLE_EVT_TX_COMPLETE", //0x01
"BLE_EVT_USER_MEM_REQUEST", //0x02
"BLE_EVT_USER_MEM_RELEASE", //0x03
"",
"",
"",
"",
"",
@DanielTimLee
DanielTimLee / arch.sh
Last active December 6, 2020 19:37
Arch linux KDE Installation
DEFAULT_OPT='--noconfirm --m-arg --skipchecksums --m-arg --skippgpcheck'
sudo pacman -Syu
sudo pacman -S sudo vi zsh wget fuse git vim xorg xorg-xinit kf5 kf5-aids plasma kdebase spectacle gwenview ttf-freefont sddm sddm-kcm gtk-engines gtk2 gtk3 gnome-themes-standard gnome-icon-theme ntp networkmanager net-tools alsa-utils pulseaudio pulseaudio-alsa libcanberra-pulse libcanberra-gstreamer jack2-dbus --noconfirm
sudo systemctl enable sddm
sudo systemctl enable ntpd
sudo systemctl enable NetworkManager dhcpcd
##### SDDM Theme Setting /etc/sddm.conf
# [Theme]
@DanielTimLee
DanielTimLee / config.py
Last active March 28, 2017 19:09
crawler_init.py
class Fb_config():
def __init__(self, target):
self.target = target
# TODO : 항상 타겟이 이렇게 세팅되지 않음. profile.php?id=<int> 이렇게 붙기도 함
# 이럴때는 sk=likes 이렇게 붙음.
# maps에서 이미 다 출력했는데 아무 메시지가 나오지 않을 때도 있음.
self.base_url = "https://www.facebook.com/" + target
# TODO: 너무 self 많이 썼는데 사용하지 않고 할 수 있는 방법 찾기
self.TIMELINE_CLASS = "_1w_m"
@DanielTimLee
DanielTimLee / a.go
Last active October 13, 2016 13:26
type Wiki struct {
Id int
Title string `sql:"type varchar(300)"`
Description string `sql:"type varchar(300)"`
}