Skip to content

Instantly share code, notes, and snippets.

View kuku's full-sized avatar
👋

Mike Xu kuku

👋
  • 02:37 (UTC -04:00)
View GitHub Profile
@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 / 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