apt-get install python-pip
pip install shadowsocks
sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
// Adjustments particular to this page to ensure we hit desktop breakpoint. | |
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1}); | |
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'}); |
Port: 1080 | |
1. Create a file /YOUR PATH/gitproxy.sh with content: | |
#!/bin/sh | |
nc -X 5 -x 127.0.0.1:1080 "$@" | |
2. Edit your ~/.gitconfig | |
# For git:// |
@font-face { | |
font-family: 'Fira Code'; | |
src: url("https://cdn.rawgit.com/dunovank/jupyter-themes/1e851888/jupyterthemes/fonts/monospace/firacode/firacode.otf") format("opentype"); | |
} | |
.CodeMirror { | |
font-family: 'Fira Code'; | |
font-variant-ligatures: initial; | |
} |
1. `vim /etc/syslog.conf` | |
2. Add to end of file: `cron.* /var/log/cron.log` | |
3. | |
``` | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist | |
sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist | |
``` | |
[where-is-the-cron-log-file-in-macosx-lion](http://apple.stackexchange.com/questions/38861/where-is-the-cron-log-file-in-macosx-lion) |
Basics of the Unix Philosophy | |
============================= | |
Rule of Modularity: Write simple parts connected by clean interfaces | |
Rule of Clarity: Clarity is better than cleverness | |
Rule of Composition: Design programs to be connected with other programs | |
Rule of Separation: Separate policy from mechanism; separate interfaces from engines |
#!/usr/bin/env python3 | |
""" | |
ZSH history convert script. | |
When you mistakenly type your password or quite bad command into ZSH, | |
you may want to remove the entry from the history. | |
The problem is, the .zsh_history is encoded in a weird format! | |
If you want to find a command with non-ASCII character, it'll be problematic. |
#!/usr/bin/env python | |
'''A script to calculate adler32 checksum of given files''' | |
BLOCKSIZE=256*1024*1024 | |
import sys | |
from zlib import adler32 | |
for fname in sys.argv[1:]: | |
asum = 1 | |
with open(fname,"rb") as f: |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real