Skip to content

Instantly share code, notes, and snippets.

View shuxiao9058's full-sized avatar
🎯
Focusing

Aaron Ji shuxiao9058

🎯
Focusing
View GitHub Profile
@shuxiao9058
shuxiao9058 / libz.sh
Created February 4, 2021 12:34 — forked from dulacp/libz.sh
Download & Compile Libz (zlib) for iOS (all architectures)
# Builds a ZLib framework for the iPhone and the iPhone Simulator.
# Creates a set of universal libraries that can be used on an iPhone and in the
# iPhone simulator. Then creates a pseudo-framework to make using libz in Xcode
# less painful.
#
# To configure the script, define:
# IPHONE_SDKVERSION: iPhone SDK version (e.g. 8.1)
#
# Then go get the source tar.bz of the libz you want to build, shove it in the
# same directory as this script, and run "./libz.sh". Grab a cuppa. And voila.
@shuxiao9058
shuxiao9058 / .emacs
Created February 28, 2020 03:16 — forked from redguardtoo/.emacs
minimum emacs setup for Emacs plugin testing
;; A minimum .emacs to test Emacs plugins
(show-paren-mode 1)
(eval-when-compile (require 'cl))
;; test elisps download from internet here
(setq test-elisp-dir "~/test-elisp/")
(unless (file-exists-p (expand-file-name test-elisp-dir))
(make-directory (expand-file-name test-elisp-dir)))
(setq load-path
@shuxiao9058
shuxiao9058 / doom.txt
Created February 7, 2020 14:32 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@shuxiao9058
shuxiao9058 / ssh.d.proxy.plist
Created July 15, 2019 15:02 — forked from chzealot/ssh.d.proxy.plist
开机自动启动ssh-D代理 $ launchctl load ~/Library/LaunchAgents/ssh.d.proxy.plist
<?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>Label</key>
<string>ssh.d.proxy</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/ssh</string>
<string>-D</string>
@shuxiao9058
shuxiao9058 / script-daily-sync.applescript
Created June 14, 2019 08:58
Mac Automation Scripts
-- ==================================================================
-- PROGRESS
-- ==================================================================
set progress description to "Daily Sync"
set progress total steps to 2
property progressSteps : 0
on updateProgress(description)
delay 1
set progress additional description to description
@shuxiao9058
shuxiao9058 / SendToThings.scpt
Created June 13, 2019 14:14 — forked from byronrode/SendToThings.scpt
Create To Do in Things
on perform_mail_action(info)
set selectedMessages to |SelectedMessages| of info
tell application "Mail"
repeat with eachMessage in selectedMessages
set theSubject to the subject of the eachMessage
set theContent to the content of the eachMessage
set tid to AppleScript's text item delimiters
/*
* HHKB Layout
*/
#include "keymap_common.h"
#ifdef KEYMAP_SECTION_ENABLE
const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
#else
const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
#endif
@shuxiao9058
shuxiao9058 / gist:512dc3b58f044bc277834d58a26fe7ab
Created April 14, 2019 10:10 — forked from yorkxin/gist:221439
my DefaultFontFallbacks.plist
<?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">
<!-- ATSUI-compatible preferred fallback -->
<dict>
<!-- default ordered fallback list - fallback entity has to be PostScript name -->
<key>default</key>
<array>
<string>LucidaGrande</string> <!-- MAKE sure this matches the kCTFontSystemFontType in CTFontDescriptorCreateForUIType() & TDescriptorSourceImp::CreateDefaultDescriptor()! -->
<string>AppleSymbolsFB</string>
@shuxiao9058
shuxiao9058 / dashtest.el
Created March 26, 2019 11:19 — forked from Wilfred/dashtest.el
dolist vs mapcar
;;; dashtest.el --- benchmarking dash -*- lexical-binding: t -*-
(defmacro --map-mapcar (form list)
(declare (debug (form form)))
`(mapcar (lambda (it) ,form) ,list))
(defmacro --map-loop (form list)
(declare (debug (form form)))
(let ((result-sym (make-symbol "result")))
`(let (,result-sym)
@shuxiao9058
shuxiao9058 / gist:f7914326df925ab4b16160d01d066464
Created March 14, 2019 15:36 — forked from dmitshur/gist:6927554
How to `go get` private repos using SSH key auth instead of password auth.
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!