Skip to content

Instantly share code, notes, and snippets.

View wynemo's full-sized avatar
🤣
快落的时光总那么少

Nemo.Zhang wynemo

🤣
快落的时光总那么少
View GitHub Profile
@wynemo
wynemo / Youtube Advanced Speed Controller.user.js
Last active June 16, 2023 17:12
Youtube Advanced Speed Controller
// ==UserScript==
// @name Youtube Advanced Speed Controller
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Allows you to play youtube videos from 0 to 16 times normal speed
// @author Ehren Julien-Neitzert
// @match https://www.youtube.com/*
// @grant none
// ==/UserScript==
@wynemo
wynemo / z-lib-douban.user.js
Last active December 5, 2022 16:56
在豆瓣查找Z-lib资源
// ==UserScript==
// @name 在豆瓣查找Z-lib资源
// @description 直接查找在Z-lib网站上的书籍资源
// @namespace http://tampermonkey.net/
// @version 0.5
// @author Tim
// @match https://book.douban.com/*
// @grant GM_xmlhttpRequest
// @license MIT
// ==/UserScript==
@wynemo
wynemo / main.py
Created August 30, 2022 16:00
sqlalchemy sqlite in memory static pool
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.pool import StaticPool
import sqlite3
# According to SQLite documentation, both strings below should create in-memory databases:
#url_mode_memory = "sqlite:///file:foo.db?mode=memory&uri=true"
url_mode_memory = "file:foo.db?mode=memory&cache=shared"
sql_url = f'sqlite:///{url_mode_memory}'
@wynemo
wynemo / psycopg2 python2.6.md
Last active December 21, 2020 01:40
psycopg2 python2.6.md

gcc

yum install gcc

install pg 10

sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum install -y postgresql10-server
sudo service postgresql-10 initdb
sudo chkconfig postgresql-10 on
@wynemo
wynemo / .bashrc
Created October 14, 2019 15:57
haha.bashrc
#~/.bashrc
cat << EOF
........;,',,...
....,lxkOK0K0XXXXXXKK0koc:,.
.c,.cOKXXXXXXXXXXXXXXXXXXXXXXKOkd:.
.;,:o0KK00KXXXXKKKK00OOO0K0KKKXXXXXXKx,
;;...,::;lk0d,...... ...':xKXXXXKl
d0do, .c,. .xXXXXXl

use aptitude to install redsocks:

pi@raspberrypi:~ $ sudo aptitude show redsocks Package: redsocks
Version: 0.5-1 State: installed

@wynemo
wynemo / 519888.py
Last active August 19, 2022 05:31
同花顺买519888
import pyautogui
import time
pyautogui.moveTo(134, 1)
pyautogui.click()
pyautogui.hotkey('f1')
pyautogui.moveTo(260, 112)
pyautogui.click()
pyautogui.typewrite('519888')
time.sleep(0.5)
pyautogui.moveTo(278, 201)
@wynemo
wynemo / django_admin_hello_world.sh
Created November 27, 2018 02:58
django admin hello world
~/miniconda2/envs/py2k/bin/django-admin startproject mytrans
zdbdeMacBook-Air:hashlong zdb$ cd mytrans/
zdbdeMacBook-Air:mytrans zdb$ ls
manage.py mytrans
~/miniconda2/envs/py2k/bin/python manage.py startapp polls
~/miniconda2/envs/py2k/bin/python manage.py runserver
@wynemo
wynemo / .hgrc
Last active August 15, 2018 03:42
tortoisehg meld .hgrc config on mac
[ui]
username = nemo.zhang
merge = meld
editor = vim
[extensions]
mq =
extdiff =
[extdiff]