This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// netj's icon with HTML5 canvas | |
function drawIconOnCanvas(w, opacity, canvas, a) { | |
if (canvas.getContext) { | |
var c = canvas.getContext("2d"); | |
// name some constants | |
canvas.width = canvas.height = w; | |
c.clearRect(0, 0, w, w); | |
var o = w/12; | |
var l = (w-3*o)/2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- moveAndResize -- a piece of AppleScript for changing the size and position of windows | |
-- Author: Jaeho Shin <netj@sparcs.org> | |
-- Created: 2012-06-09 | |
(* | |
Running the following line will move and resize all windows of that application: | |
tell application "Finder" to my moveAndResize(x,y, windows, w,h) | |
For x,y,w,h, you can give: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# mosh-server wrapper for Kerberos/AFS home environment | |
# | |
# Author: Jaeho Shin <netj@cs.stanford.edu> | |
# Created: 2014-04-25 | |
# Requires: readlink in GNU coreutils | |
set -eu | |
self=$(readlink -f "$0") | |
next=$(type -ap mosh-server | xargs -L1 readlink -f | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# remocon -- run given command remotely, replicating local git work tree on a remote host, and downloading remote changes if needed | |
# | |
# Author: Jaeho Shin <netj@sparcs.org> | |
# Created: 2018-03-08 | |
## | |
set -euo pipefail | |
error() { echo >&2 "📡 ‼️ " "$@"; false; } | |
warning() { echo >&2 "📡 ⚠️ " "$@"; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# exshell -- a handy way to use command-line formulae's output to augment a TAB-separated input | |
# | |
# Synopsis: | |
# $ cat a.txt | |
# USA United States of America | |
# India Republic of India | |
# South_Korea Republic of Korea (ROK) | |
# | |
# $ exshell <a.txt \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
COLOR_NONE="\[\e[0m\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 Joël Kuiper | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The PDFTextAnnotator will accept a PDF and a pattern, it will highlight all occurances of that pattern in the document. | |
It inherits from the PDFTextStripper (so things like start end end page should still be configurable) | |
See the App file for a basic usage example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# ~/.ssh/aws-ssm-ssh-proxy-magic.sh -- a nifty script for ssh'ing into any AWS SSM-enabled EC2 instance with no extra manual setup | |
# | |
# Author: Jaeho Shin <netj@sparcs.org> | |
# Created: 2021-02-01 | |
# See also: | |
# - https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started-enable-ssh-connections.html | |
# - https://gist.github.com/d9006a823163d7662d8ff105c9a49e0e | |
# | |
# 1. Copy this script to ~/.ssh/aws-ssm-ssh-proxy-magic.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# A script for changing Mac OS X's default fonts | |
# Author: Jaeho Shin <netj@sparcs.org> | |
# Created: 2011-07-22 | |
### MacOSXDefaultFontFallbacksChanger ######################################### | |
## Mac OS X 기본 글꼴 설정 변경 도구 – 1.2.1 (2012-08) | |
## http://netj.github.com/MacOSXDefaultFontFallbacksChanger | |
############################################################################### |
OlderNewer