Skip to content

Instantly share code, notes, and snippets.

@junmakii
junmakii / test.sh
Last active September 30, 2018 03:49
echo hello world
echo user: ${HOME}
echo pwd: ${PWD}
echo shell: ${SHELL}
echo variable: ${x}
case ${1} in
init)
cat /etc/yum.conf /data/yum.conf.bak
cat /etc/yum.conf | sed 's/cachedir=.*/cachedir=\/opt\/yum-cache/' | sed 's/keepcache=0/keepcache=1/' > /tmp/yum.conf
cp /tmp/yum.conf /etc/yum.conf
yum makecache
yum update -y
yum install -y epel-release
yum install -y "@Development Tools"
yum install -y bash-completion bash-completion-extra
var messageHistory = []; var els = document.body.querySelectorAll('yt-live-chat-text-message-renderer'); Array.from(els).filter(el => Array.from(messageHistory).filter(message => message.getAttribute('id') === el.getAttribute('id')).length === 0).map(el => { messageHistory.push(el); return el.querySelector('#message').textContent });
var messageHistory = [];
var src = 'http://static.junmakii.umu.us/bell.ogg';
var audioEl = document.createElement('audio');
audioEl.setAttribute('src', src);
let play = function () {
let el = audioEl.cloneNode(true);
el.play();
};
[aliases]
test=pytest
[tool:pytest]
doctest_plus = enabled
addopts = --ignore=env --doctest-modules
#--ignore-toplevel=setup.py
testpaths=mypkg
norecursedirs=lib include .tox
(run-at-time nil (* 5 60) 'recentf-save-list)
(setq recentf-max-saved-items 200
recentf-max-menu-items 15)
(recentf-mode +1)
; In markdown-mode, Press <TAB> on a ### line.
(windmove-default-keybindings (kbd "S"))
(run-at-time nil (* 5 60) 'recentf-save-list)
(setq recentf-max-saved-items 200
recentf-max-menu-items 15)
(recentf-mode +1)
; In markdown-mode, Press <TAB> on a ### line.
(windmove-default-keybindings (kbd "S"))
"""
$ gunicorn -k tornado junmakii_test_tornado_with_gunicorn:app
"""
import tornado.web
import tornado.wsgi
import tornado.web
import tornado.web
import tornado.wsgi
import tornado.web
class AppHandler(tornado.web.RequestHandler):
def initialize(self, queue):
self.queue = queue
def get(self):
# coding: utf-8
def encode_object_and_list(data, encoding='utf=8'):
"""
:rtype: Union[list, tuple, dict]
>>> encode_object_and_list({u"name": u"James"})
{'name': 'James'}
"""A image utility function to keep image aspect ratio.
"""
def get_size(im_size, size):
"""
:rtype: (int, int)
>>> get_size((360, 100), (360, 180))
(648, 180)