Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@simonliu009
simonliu009 / linux.kill
Last active August 26, 2019 17:35
[linux 杀死进程] #linux
ps -ef|grep 程序名 | awk '{print $2}' | xargs kill -9
ps -ef|grep server.py | awk '{print $2}' | xargs kill -9
@simonliu009
simonliu009 / ESP32_wifi_dns.c
Created July 28, 2019 06:45 — forked from MakerAsia/ESP32_wifi_dns.c
ESP32 (ESP-IDF) WiFi connect and resolve DNS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "lwip/inet.h"
#include "lwip/ip4_addr.h"
#include "lwip/dns.h"
@simonliu009
simonliu009 / main.py
Created July 20, 2019 13:11 — forked from cloverstd/main.py
Handle file upload by Tornado and Nginx Upload Module
#!/usr/bin/env python
# encoding: utf-8
import tornado.ioloop
import tornado.web
import tornado.log
import tornado.httpserver
from tornado.options import define, options
import logging
import tornado.gen
@simonliu009
simonliu009 / KiCad
Last active October 12, 2021 00:39
[KiCad shortcuts]KiCad 快捷方式 #KiCad
原理图Schmatic:
Shift+A 放置元件 place components
M 移动元件
G 拖动连线
E 编辑属性
C 复制
R 旋转
X X轴镜像
Y Y轴镜像
Shift+L 标签
@simonliu009
simonliu009 / file header snippets
Last active March 2, 2019 11:18
[file header snippets]file header snippet for .h file #vscode
{
"#ifndef … #define … #endif":{
"prefix": "def",
"body": "#ifndef ${1:${TM_FILENAME_BASE/(.*)/_${1:/upcase}_H/i}} \n#define $1 \n#ifdef __cplusplus\nextern \"C\" {\n#endif\n${2:}\n\n\n#ifdef __cplusplus\n}\n#endif\n#endif\t// $1"
}
@simonliu009
simonliu009 / cleanMac
Last active March 2, 2019 10:53
[cleanMac]temporary and cached files that can be deleted from macOS #macOS
~/library/Logs
~/library/Android/sdk
~/library/caches/Images
~/library/caches/Videos
~/library/caches/Firefox
~/library/caches/Avatar Adobe AndroidStudio2.2
~/Library/Application Support/Telegram\ Desktop
~/Library/Application Support/Kodi
@simonliu009
simonliu009 / kodi.tv
Created February 24, 2019 13:08
[kodi]热门插件 #kodi
除了exodus magic dragon 还有哪些热门的插件
目前我知道的三个热门插件 exodus 魔龙 看门狗
yoda
watch dogs
supremacy
5ivdo
youkuTV
Grindhouse Beauty
Exodus redux
13Clowns Video/b
@simonliu009
simonliu009 / char to int
Last active December 25, 2019 05:03
[char to int, int to char] #c
char to int:
(int)(a[i] - '0')
int to char:
(char)(num + '0')
@simonliu009
simonliu009 / strtol
Last active December 25, 2019 04:57
[string to int/string to float]strtol #c
]
strtol, strtoll, strtoq - convert a string to a long integer
atoi, atol, atoll, atoq - convert a string to an integer
atof() - convert a string to a float
Synopsis
#include <stdlib.h>
long int strtol(const char *nptr, char **endptr, int base);
@simonliu009
simonliu009 / string to char
Created January 10, 2019 03:24
[string to char *] convert string to char * #c #string #char
String.c_str()