Skip to content

Instantly share code, notes, and snippets.

View weaming's full-sized avatar
🦀
Rustacean

Garden Yuen weaming

🦀
Rustacean
  • Shenzhen, China
View GitHub Profile
"""
Usage:
>>> class Color(SimpleEnum):
>>> red = KV
>>> green = 'green' # same as using `KV`
>>> grey = 'gray'
>>> Color.red
'red'
>>> Color.grey
@shellexy
shellexy / NoCSS.js
Created January 6, 2018 11:44
去除网页样式的 bookmarklet 书签工具
javascript:
(function(){
if (f=document.querySelector('frame[name="Main"]')) {
window.location.href = f.src;
}
document.body.style.margin = "10%";
document.body.style.lineHeight = "2em";
document.body.bgColor = "#F5F5B5";
document.body.text = "#000000";
@easychen
easychen / weibopicbed.js
Created July 16, 2017 08:30
微博图床上传函数
// from https://github.com/suxiaogang/WeiboPicBed
// under its license
function uploadToWeibo( url , callback )
{
var xhr = new XMLHttpRequest();
xhr.onload = function() {
var reader = new FileReader();
reader.onloadend = function( e )
{
func uploadWeibo(fn string) ([]byte, error) {
file, err := os.Open(fn)
if err != nil {
return nil, err
}
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
@douglasmiranda
douglasmiranda / install.sh
Last active October 23, 2019 02:26
After Install Ubuntu 17.10 - Chrome, Fish Shell, Docker, Docker Compose
sudo apt update
sudo apt upgrade -y
# Remember: install / verify additional drivers
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt update
# google chrome and chrome extension to use gnome extensions
#!/usr/bin/env python
import sys
from graphviz import Digraph
dot = Digraph(comment='alembic')
def split_line(line):
bases, _, name_and_target = line.partition('->')
id_and_stuff, _, desc = name_and_target.strip().partition(',')
@weaming
weaming / google-center.css
Created July 6, 2018 11:24
Make google search center on wide screen
.mw,
.tsf{
margin: 0 auto;
}
/* search tool bar */
#hdtb-msb,
#resultStats {
position: relative;
left: calc((100vw - 950px)/2);
@nikAizuddin
nikAizuddin / oreilly-freebooks.sh
Last active October 20, 2020 03:34
This UNIX Shell script will download most O'Reilly free pdf books about Programming, Security, Business, Data, Design, IoT, WebDev, and WebOps from http://www.oreilly.com/programming/free/.
#!/bin/sh
################################################################################
## This UNIX Shell script will download most O'Reilly free pdf books
## about Programming, Security, Business, Data, Design, IoT, WebDev, and WebOps
## from http://www.oreilly.com/programming/free/.
## There are a few books that are non-free, so I don't list them here.
##
## --- How to RUN? ---
## $ sh -e oreilly-freebooks.sh
@Akagi201
Akagi201 / stock.md
Last active January 7, 2021 10:45
[stock]

新股发行

券商交易系统

后台的核心交易系统

  • 金证: 国君、安信、国信等;
  • 恒生: 在集中交易(也就是网上交易)上后来追上,代表券商:中信、广发、华泰、国金,以及一些小券商,技术薄弱,全套恒生系统
  • 顶点: 招商、中航
  • 金仕达: 东方、海通、招商等
  • 根网: 中金
@weaming
weaming / confirm.go
Created February 3, 2021 09:47 — forked from r0l1/confirm.go
Go (golang): How to ask for user confirmation via command line
/* MIT License
*
* Copyright (c) 2017 Roland Singer [roland.singer@desertbit.com]
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: