Skip to content

Instantly share code, notes, and snippets.

View myungseokang's full-sized avatar
🍀
Good Luck

강명서 (Myungseo Kang) myungseokang

🍀
Good Luck
View GitHub Profile
# https://stackoverflow.com/a/25721662
# in macOS
ssh-add --apple-use-keychain ~/.ssh/id_rsa
eval $(ssh-agent)
ssh-add 
git pull
@myungseokang
myungseokang / pip.js
Created September 28, 2018 01:35
Picture in Picture
javascript:(function()%7Bvar%20video%20%3D%20document.getElementsByTagName('video')%5B0%5D%3Bvideo.play()%3Bvideo.webkitSetPresentationMode(video.webkitPresentationMode%20%3D%3D%3D%20%22picture-in-picture%22%20%3F%20%22inline%22%20%3A%20%22picture-in-picture%22)%7D)()
import json
import requests
from bs4 import BeautifulSoup
from requests import Response
from cards.models import Card
CARD_LIST_URL = 'http://hs.inven.co.kr/dataninfo/card/list.ajax.php'
import unittest
from unittest import mock
import requests
from requests.exceptions import HTTPError
def google_query(query):
url = "https://www.google.com"
params = {'q': query}
resp = requests.get(url, params=params)
@myungseokang
myungseokang / star.c
Last active March 26, 2018 02:25
Star of David
#include <stdio.h>
void main() {
int i, j, k, num;
scanf("%d", &num);
for(i=0; i<num; i++) {
for(j=0; j<num*2+1; j++) printf(" ");
for(k=i; k<num; k++) printf(" ");
@myungseokang
myungseokang / get_query_count.py
Last active November 16, 2020 09:05
Get query info in django view
from django.db import connection, reset_queries
print(len(connection.queries))
reset_queries()
machine:
python:
version: 3.4.4
timezone:
Asia/Seoul
environment:
DJANGO_SETTINGS_MODULE: config.settings.test
AWS_ACCESS_KEY_ID: AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: AWS_SECRET_ACCESS_KEY
@myungseokang
myungseokang / vim-heroku.sh
Created September 16, 2017 07:34 — forked from dvdbng/vim-heroku.sh
Run vim in heroku updated 2017
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -
@myungseokang
myungseokang / GitCommitEmoji.md
Created August 27, 2017 15:20 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji