Skip to content

Instantly share code, notes, and snippets.

Avatar
🇰🇷

CHANN channprj

🇰🇷
View GitHub Profile
@channprj
channprj / AWSSecurityContents.md
Created Aug 12, 2020 — forked from serithemage/AWSSecurityContents.md
AWS 보안 관련 자료 모음집
View AWSSecurityContents.md

AWS 학습 링크집 시리즈

AWS 보안 관련 컨텐츠 모음집(http://bit.ly/secontents)

AWS 공식문서 중 보안에 관련된 자료들을 한글 자료 중심으로 정리한 페이지 입니다.

View keybase-github.md

키베이스로 깃 커밋 서명하는법

A. PGP 공개키-비공개키 키쌍 등록

갖고있는 PGP 키쌍이 없을경우 새로 만들어야한다. 이미 키 쌍이 keybase에 업로드되어있는 경우, 기존의 키를 컴퓨터에 다운로드하기만 하면 된다.

A.1. 새 키 만들어서 하는법

keybase login
@channprj
channprj / docker-compose.yml
Created Jul 6, 2020 — forked from barnybug/docker-compose.yml
Docker compose for a Docker-in-docker gitlab runners setup
View docker-compose.yml
# Docker-in-Docker Gitlab runners setup taken from:
# https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca
dind:
restart: always
privileged: true
volumes:
- /var/lib/docker
image: docker:17.09.0-ce-dind
command:
- --storage-driver=overlay2
@channprj
channprj / audit_mixin.py
Created Mar 5, 2020 — forked from techniq/audit_mixin.py
Useful SQLAlchemy Mixins
View audit_mixin.py
from datetime import datetime
from sqlalchemy import Column, Integer, DateTime, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declared_attr
from flask_security import current_user
class AuditMixin(object):
created_at = Column(DateTime, default=datetime.now)
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)
@channprj
channprj / repo-reset.md
Created Dec 18, 2019 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands
View repo-reset.md

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@channprj
channprj / digicheck.py
Created Nov 5, 2019 — forked from petri/digicheck.py
Single-file Python digital signature maker and checker
View digicheck.py
"""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 Jul 22, 2019 — 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.
View setup github issues labels.sh
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"
View gist:fa6a42568872a777515eb666faaae2a9
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app="https://www.google.com"
@channprj
channprj / attributes.rb
Created Apr 22, 2019 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
View attributes.rb
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
View install-imgcat.sh
# 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