Skip to content

Instantly share code, notes, and snippets.

View channprj's full-sized avatar

Heechan Park channprj

View GitHub Profile
@channprj
channprj / digicheck.py
Created November 5, 2019 08:18 — forked from petri/digicheck.py
Single-file Python digital signature maker and checker
"""digicheck - create and verify signatures for files
Usage:
digicheck keys
digicheck public <keyfilename>
digicheck sign <filename> <keyfilename>
digicheck check <filename> <keyfilename> <signaturefilename>
digicheck (-h | --help)
digicheck --version
@channprj
channprj / setup github issues labels.sh
Created July 22, 2019 07:32 — forked from rentzsch/setup github issues labels.sh
Shell script to set up a GitHub Project's Issues' Labels as described in <http://rentzsch.tumblr.com/post/252878320/my-lighthouse-ticket-settings-with-colors>. WARNING: script assumes a newish project that hasn't really used labels yet. It deletes all default labels, which means DATA LOSS if you've used them for anything.
USER=rentzsch
PASS=mypassword
REPO=mogenerator
# Delete default labels
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/bug"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/duplicate"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/enhancement"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/invalid"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/question"
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app="https://www.google.com"
@channprj
channprj / attributes.rb
Created April 22, 2019 15:31 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
# Local
curl -L https://iterm2.com/misc/install_shell_integration_and_utilities.sh | bash
curl -L https://iterm2.com/utilities/imgcat > ${HOME}/.iterm2/imgcat
# Remote server
sudo curl -o /usr/local/bin/imgcat -O https://iterm2.com/utilities/imgcat && sudo chmod +x /usr/local/bin/imgcat
# sudo wget https://iterm2.com/utilities/imgcat /usr/local/bin && sudo chmod +x /usr/local/bin/imgcat
# Enjoy it now! :-)
imgcat /tmp/sample.png
@channprj
channprj / go-os-arch.md
Created January 22, 2019 07:37 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.8.3 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • android
  • darwin
@channprj
channprj / ddclient-cloudflare-macosx.md
Created January 16, 2019 16:20 — forked from tehpeh/ddclient-cloudflare-macosx.md
Dynamic DNS for Mac OS X with CloudFlare and ddclient

Description

Dyn's free dynamic DNS service will be ending on Wednesday, May 7th, 2014.

CloudFlare, however, has a little known feature that will allow you to update your DNS records via API or a command line script called ddclient. This will give you the same result, and it's also free.

Unfortunately, ddclient does not work with CloudFlare out of the box. There is a patch available

@channprj
channprj / kr_won_to_backquote.sh
Created September 27, 2018 02:10 — forked from redism/kr_won_to_backquote.sh
macOS Sierra에서 원화(₩) 대신 백 쿼트(`) 입력하기
#!/bin/bash
if [ -f ~/Library/KeyBindings/DefaultkeyBinding.dict ]; then
echo "~/Library/KeyBindings/DefaultkeyBinding.dict already exists"
exit -1
fi
mkdir -p ~/Library/KeyBindings
cat << EOF > ~/Library/KeyBindings/DefaultkeyBinding.dict
{
"₩" = ("insertText:", "\`");
@channprj
channprj / github_gpg_key.md
Created August 31, 2018 08:09 — forked from ankurk91/github_gpg_key.md
Github : Signing commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS
@channprj
channprj / media-query.css
Created August 24, 2018 11:53 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS