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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: blog | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
### END INIT INFO |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: my_service | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Put a short description of the service here | |
# Description: Put a long description of the service here |
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
# coupang cash code | |
# https://coupang.saramin.co.kr/_service/coupang/apply_site/apply/recruit_default.asp | |
# shift operation (x >> 1) and convert to ascii character | |
cipher_text = ['212', '242', '214', '194', '220', '206', '128', '198', '222', '234', '224', '194', '220', '206', '92', '198', '222', '218'] | |
def shift_operation(x): | |
x = int(x) | |
return x >> 1 | |
for i in range(len(cipher_text)): |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: kupy | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Jupyter init script | |
# Description: Jupyter init script |
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
import pip | |
from subprocess import call | |
for dist in pip.get_installed_distributions(): | |
call("pip install --upgrade " + dist.project_name, shell=True) |
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
upstream uwsgi { | |
ip_hash; | |
server 127.0.0.1:40000; | |
} | |
server { | |
listen 80; | |
server_name www.domain.com; | |
root /sites/mysite/; | |
access_log /sites/mysite/log/nginx/access.log; |
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
// ==UserScript== | |
// @name Bugs Music Player Black | |
// @namespace https://chann.kr | |
// @version 0.1 | |
// @description bugs music player black theme by default | |
// @author CHANN | |
// @match http*://music.bugs.co.kr/newPlayer?* | |
// @grant none | |
// ==/UserScript== |
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
### docker run -it -p 12300:80 -p 12301:8000 -p 12302:8888 -d your/docker-image:latest zsh | |
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; |
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
#!/bin/sh | |
# WIP prevent duplicate cron job shell executions. | |
# refer: http://bencane.com/2015/09/22/preventing-duplicate-cron-job-executions/ | |
do_function() { | |
# do something... | |
} | |
PIDFILE=/path/to/<YOUR_PID_FILE>.pid | |
if [ -f $PIDFILE ] ## if pid file exist and it is not a directory |
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
var jsSet = { item: 0 }; // use Object key as set item | |
item = 'setItem' | |
if (!(item in jsSet)) { // if item not in jsSet | |
jsSet[item] = 1; // save item with meaningless value | |
} | |
sessionStorage.setItem('jsSet', JSON.stringify(Object.keys(usages))) // save into sessionStorage |
OlderNewer