Skip to content

Instantly share code, notes, and snippets.

View kuku's full-sized avatar
👋

Mike Xu kuku

👋
  • 18:29 (UTC -04:00)
View GitHub Profile
- DOMAIN-KEYWORD,epochtimes,REJECT
- DOMAIN-SUFFIX,881903.com,REJECT
- DOMAIN-SUFFIX,aboluowang.com,REJECT
- DOMAIN-SUFFIX,bannedbook.org,REJECT
- DOMAIN-SUFFIX,china21.org,REJECT
- DOMAIN-SUFFIX,chinaaffairs.org,REJECT
- DOMAIN-SUFFIX,dajiyuan.com,REJECT
- DOMAIN-SUFFIX,dalianmeng.org,REJECT
- DOMAIN-SUFFIX,dkn.tv,REJECT
- DOMAIN-SUFFIX,dongtaiwang.com,REJECT
@kuku
kuku / ginjson.go
Last active November 19, 2020 07:04
在 gin 中读取 body 中的 json 数据
// https://pkg.go.dev/github.com/gin-gonic/gin#Context.BindJSON
type Params struct {
PostName string `json:"postName"`
}
r.POST("/", func(c *gin.Context) {
var someParams Params
err := c.BindJSON(&someParams)
if err != nil {
log.Fatal(err)
@kuku
kuku / Python3 Virtualenv Setup.md
Created January 20, 2019 01:37 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@kuku
kuku / define.py
Created August 31, 2018 01:09 — forked from lambdamusic/define.py
Access osx dictionary in python
#!/usr/bin/env python
"""
Modified from
http://macscripter.net/viewtopic.php?id=26675
http://apple.stackexchange.com/questions/90040/look-up-a-word-in-dictionary-app-in-terminal
HowTo
@kuku
kuku / markdownhere.css
Created January 25, 2018 08:28 — forked from xiaolai/markdownhere.css
markdown-here-css
.markdown-here-wrapper {
font-size: 16px;
line-height: 1.8em;
letter-spacing: 0.1em;
}
pre, code {
font-size: 14px;
font-family: Roboto, 'Courier New', Consolas, Inconsolata, Courier, monospace;
@kuku
kuku / Word and Character Count.scpt
Created October 9, 2017 02:17
Word and Character Count service for Mac OS X
-- Word and Character Count service for Mac OS X
-- Adds a Word and Character Count option to the text selection context menu
-- Use Automator to create a new service, then select the Run AppleScript action. Make
-- sure the service is set to receive "text", at the top of the window. Paste in this code
-- and save as "Word and Character Count". Now switch to a new app, select some text,
-- right-click, go to Services, and find the new option.
-- Copyright 2015, Noah Slater <[email protected]>
@kuku
kuku / gitfetch.sh
Created June 28, 2016 09:56
当本地看不到远程git 分支的时候,可以这样来获得。 http://stackoverflow.com/questions/12578665/i-cant-see-my-remote-branch
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch origin
@kuku
kuku / netpps.sh
Created April 6, 2016 09:01 — forked from joemiller/netpps.sh
shell: quick linux scripts for showing network bandwidth or packets-per-second
#!/bin/bash
if [ -z "$1" ]; then
echo
echo usage: $0 network-interface
echo
echo e.g. $0 eth0
echo
echo shows packets-per-second

iTerm2 – Useful Shortcuts (Mac OS X)

with a hat tip to Sublime Text 2 Shortcuts

The Awesome

⌘; autocomplete
⌘⌥B instant replay
⌘⌥E search across all tabs
@kuku
kuku / 0_reuse_code.js
Created May 7, 2014 11:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console