Skip to content

Instantly share code, notes, and snippets.

View qqpann's full-sized avatar
🍊

Qiushi Pan qqpann

🍊
View GitHub Profile
@qqpann
qqpann / init.coffee
Last active August 14, 2017 13:24
Atomのウィンドウサイズ、プロジェクトツリーのサイズを固定する ref: http://qiita.com/Qiuqiu/items/994c52202bb84f8e6835
atom.setSize(900, 800)
@qqpann
qqpann / .tmux.conf
Created September 15, 2017 03:58
[Tmux] セッションを自動保存・リストア ref: http://qiita.com/Qiuqiu/items/5fea753e38a276abf42f
#===================================
# Auto start tmux and restore
#===================================
# auto start terminal
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm'
# auto restore tmux
set -g @continuum-restore 'on'
@qqpann
qqpann / switch-class.html
Last active January 10, 2018 08:10
CSS JS | change class button
<button onclick="book()">図書</button>
<button onclick="mgzn()">雑誌</button>
<h2>図書</h2>
<div id="book" class="red-card">
<p>
Book book book.
</p>
</div>
@qqpann
qqpann / file0.txt
Last active February 18, 2019 10:05
ディレクトリ内のShift-JISをUTF-8に一括変換する ref: https://qiita.com/qqhann/items/50393721377e634bec5e
$ nkf -Lu -w --overwrite *
@qqpann
qqpann / file0.txt
Last active August 16, 2022 20:21
Puppeteer 1.0.0対応 ヘッドレスChrome逆引きクイックスタート ref: https://qiita.com/qiugits/items/ad1e2de07237ced141c4
mkdir try-puppeteer
cd try-puppeteer
npm i --save puppeteer
@qqpann
qqpann / Django-twitter-views.py
Created June 30, 2018 12:29
Use Django to authenticate with Twitter.
import cgi
import os
import oauth2 as oauth
from django.conf import settings
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
@qqpann
qqpann / vimscript.md
Created August 18, 2018 15:41
[Prettify Json with Vim] Format json file to human readable. #json #vim
@qqpann
qqpann / index.md
Last active September 8, 2018 05:38
[Network Commands] Commands related to network #network
iptables
arp -a
ifconfig
@qqpann
qqpann / debug.py
Last active November 19, 2018 16:02
[Python Debug Logging best practice] #python #debug #logging
import pdb; pdb.set_trace()
@qqpann
qqpann / index.md
Last active August 31, 2018 05:53
[Python Threading] Threading patterns. #threading #python
def f1():
    print('play_wav')
    play_wav(fn)

def f2():
    print('post_to_rpi_api')
    post_to_rpi_api(signals)