Skip to content

Instantly share code, notes, and snippets.

View SethCalkins's full-sized avatar

Seth Calkins SethCalkins

View GitHub Profile
@SethCalkins
SethCalkins / crack_rec.md
Last active March 30, 2017 09:35
OSX Software
一Software Crack Method
  1. Locate the corresponding version of the command
    1. Open a terminal or iterm2
  2. Close the software
  3. Run
  4. Reopen Software
Sublime Text

| Version | Command |

@SethCalkins
SethCalkins / material-theme.itermcolors
Created December 27, 2015 21:40 — forked from xinan/material-theme.itermcolors
Material Theme iTerm2 Port
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.25882352941176467</real>
<key>Green Component</key>
<real>0.21176470588235294</real>
@SethCalkins
SethCalkins / note-on-osx-pingfang.md
Last active September 25, 2015 21:46 — forked from bitinn/note-on-osx-pingfang.md
A few notes on using OS X 10.11 (El Capitan)'s new Chinese font: PingFang

What's this about?

OS X 10.11, aka El Capitan, comes with a new system font for Chinese users, named PingFang, it includes 6 weights for both Simplified and Traditional Chinese. The same font also appear on iOS 9 as the default UI font, though Apple didn't mention it explicitly.

How to get it?

If you are in Apple Developer Program (costs 99 USD a year), then you can get them now at their developer resource site, otherwise you can wait for their public beta to come out in July or wait for the public release this fall (a free upgrade like previous release).

Or you can get PingFang.ttc from your developer friends, though you are probably violating its font license one way or another, but I am not a lawyer so freedom to you.

cat

For pupil: all binary can be downloaded http://pan.baidu.com/s/1hqH2Pko

After overwriting, maybe need to run chmod +x /path/to/sublime_text. For linux default installation, need to add sudo.

For programmer:

VERSION PLATFORM OFFSET ORIGINAL CRACKED
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
import requests
import math
from BeautifulSoup import BeautifulSoup
def distance_on_unit_sphere(lat1, long1, lat2, long2):
"src: http://www.johndcook.com/python_longitude_latitude.html"
degrees_to_radians = math.pi/180.0
phi1 = (90.0 - lat1)*degrees_to_radians
phi2 = (90.0 - lat2)*degrees_to_radians
@SethCalkins
SethCalkins / Gemfile
Last active August 29, 2015 14:10 — forked from sdball/Gemfile
# Ruby 1.8.7
source "https://rubygems.org"
gem "json_pure"
group :test do
gem "rspec"
gem "vcr"
gem "webmock"
@SethCalkins
SethCalkins / qualys.R
Last active August 29, 2015 14:10 — forked from hrbrmstr/qualys.R
library(RCurl)
library(XML)
library(plyr)
#' get the Qualys SSL Labs rating for a domain+cert
#'
#' @param site domain to test SSL configuration of
#' @param ip address of \code{site} (will resolve it and take\cr
#' first response if not specified, but that may not always work as you expect)
#' @param hide.results ["on"|"off"] should the results show up in the SSL Labs history (default "on")