Skip to content

Instantly share code, notes, and snippets.

@kanghyojun
kanghyojun / ssh_tunneling_test.py
Last active September 26, 2022 04:58
쿼리 딜리버리 SSH 터널링 진단 도구
"""쿼리 딜리버리 접속용 SSH 터널링 진단 도구
- AWS API 키가 필요합니다.
- Python3.6 이상의 버전에서 실행하는 것을 추천드립니다.
- boto3가 필요합니다. [virtualenv](https://docs.python.org/ko/3/library/venv.html) 환경에서 작업하시는 것을 추천합니다.
```
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install boto3
--[[
This piece of hammer spoon code tries to address the issue of not being able to
switch between Alacritty instances in OSX.
Details: https://github.com/alacritty/alacritty/issues/607
To install:
1. Install hammer spoon (https://www.hammerspoon.org/)
2. Drop this file in your hammerspoon config directory:
$HOME/.hammerspoon/others/alahack.lua
3. Open your init.lua ($HOME/.hammerspoon/init.lua) and add this at the end:
-- Load Alacritty hack
(function() {
var w = window;
if (w.ChannelIO) {
return (window.console.error || window.console.log || function(){})('ChannelIO script included twice.');
}
var ch = function() {
ch.c(arguments);
};
ch.q = [];
ch.c = function(args) {
const ButtonBox: React.FC = () => {
return (
<div id="buttonBox">
<a className="button cta-btn" href="https://app.query.delivery/people/new/">
지금 무료로 사용하기
</a>
<a className="button" href="https://www.notion.so/hops/fc293ffe8ffe4ea680a13662432e7538">
서비스 소개
</a>
@kanghyojun
kanghyojun / email.js
Last active April 9, 2021 05:32
email.js
interface ErrorNoteProps {
text: string;
}
const ErrorNote: React.FC<ErrorNoteProps> = ({text}) => (
<span className="errorNote">
{text}
</span>
);
@kanghyojun
kanghyojun / aws_policy_terraform.sh
Last active March 11, 2021 12:04
Extract all required aws policy from terraform provider
# requires
# - https://github.com/hashicorp/terraform-provider-aws
# - riggrep
# - awk,sed,sort
# - your terraform code
# - python 3.6 +
pushd your-tf-directory
rg resource\ \"aws | sed s/\[\"{\:\.\/]//g | awk '{print "rg '\''conn\\\.([A-Za-z]*)'\'' -r '\'''\$'1'\'' -N -o aws/resource_"$2".go | sort -u | awk '\''{print \""$2"::\"$1}'\''| sed s/^aws_//g"}' > /tmp/something
popd
a() {
if [[ "$1" = *Neo* ]];
then
echo "hi";
fi
echo $1;
}
SELECT
c.name,
o.price
FROM customer AS c
JOIN order AS o ON o.customer_id = c.id
WHERE
o.price > [가격]
ORDER BY o.price DESC
import json
from docutils.core import Publisher
from docutils.io import StringInput, StringOutput
from docutils.nodes import NodeVisitor, document, section
from docutils.writers import Writer
class MyTranslator(NodeVisitor):
def __init__(self, *args, **kwargs):
@kanghyojun
kanghyojun / flake8-diagnostic-languageserver
Last active December 28, 2020 07:31
diagnostic-languageserver for flake8
{
"diagnostic-languageserver.filetypes": {
"python": "flake8"
},
"diagnostic-languageserver.linters": {
"flake8": {
"sourceName": "flake8",
"command": "flake8",
"args": [
"%file"