Skip to content

Instantly share code, notes, and snippets.

View oxoxoxox's full-sized avatar

JasonChiang oxoxoxox

  • Shanghai, China
View GitHub Profile
@oxoxoxox
oxoxoxox / bash-to-zsh-hist.py
Created October 12, 2020 09:16 — forked from muendelezaji/bash-to-zsh-hist.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@oxoxoxox
oxoxoxox / iPhone X
Created August 15, 2019 07:29 — forked from Blankwonder/iPhone X
Surge Benchmark
AEAD Provider: CommonCrypto (Hadrware acceleration)
Generating random data (100.00MB)
Start benchmark rc4
Encrypt data in 0.215s
Decrypt data in 0.257s
Data integrity check completed
Start benchmark rc4-md5
Encrypt data in 0.176s
Decrypt data in 0.256s
Data integrity check completed
Generating random data (100.00MB)
Start benchmark rc4-md5
Encrypt data in 0.224s
Decrypt data in 0.222s
Start benchmark aes-128-cfb
Encrypt data in 0.599s
Decrypt data in 0.597s
Start benchmark aes-256-cfb
@oxoxoxox
oxoxoxox / golang, ubuntu go get in china.md
Created December 13, 2017 03:44 — forked from alexniver/golang, ubuntu go get in china.md
ubuntu下, 使用shadowsock和Privoxy帮助你在命令行中, 无障碍进行go get

#前言 由于大家都懂的, 国内使用go get的时候, 经常会各种失败, 如果有vpn的话, 打开vpn, 问题就解决了, 但vpn其实挺不灵活的.

相对来说shadowsock则灵活得多.

#解决方案 shadowsock + Privoxy

思路就是, 使用shadowsock建立一个本地sock5代理, 但因为go get 需要http代理, 所以需要使用privoxy把sock5代理转为http代理.

@oxoxoxox
oxoxoxox / switch.scpt
Last active January 24, 2017 03:50
Workaround for Apple Account Switcher in Alfred3 & macOS 10.12.2 & iTunes 12.5.4.42
on run argv
set account to item 1 of argv
set is_match_on to item 2 of argv
# get account password from Keychain
set _password to do shell script "/usr/bin/security find-generic-password -l 'Apple Account Switcher' -a " & account & " -w || echo denied"
# failed to get password
if _password is "denied" then
@oxoxoxox
oxoxoxox / README
Created June 3, 2016 06:06 — forked from rsstrachan/README
Convert OS X Keychain exported entries into logins for 1Password import
Updated to run on El Capitan (OS X 10.11.1) but... I'm not getting a complete export. Working on a fix.
These two files should help you to import passwords from mac OS X keychains to 1password.
Assumptions:
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
@oxoxoxox
oxoxoxox / README
Created October 18, 2015 02:39 — forked from nertzy/README
Convert OS X Keychain exported entries into logins for 1Password import
These two files should help you to import passwords from mac OS X keychains to 1password.
Assumptions:
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they
@oxoxoxox
oxoxoxox / README
Created October 18, 2015 02:37 — forked from rwest/README
Convert OS X Keychain exported entries into logins for 1Password import
These two files should help you to import passwords from mac OS X keychains to 1password.
Assumptions:
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they