Ubuntu/Debian上必須先安裝以下套件 來源
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| DOMAIN_NAME=$1 | |
| openssl req \ | |
| -newkey rsa:2048 \ | |
| -x509 \ | |
| -nodes \ |
| " Vim-plug initialization (taken from fisa-vim-config) | |
| let vim_plug_just_installed = 0 | |
| let vim_plug_path = expand('~/.vim/autoload/plug.vim') | |
| if !filereadable(vim_plug_path) | |
| echo "Installing Vim-plug..." | |
| echo "" | |
| silent !mkdir -p ~/.vim/autoload ~/.vim/dirs/backups ~/.vim/dirs/undos ~/.vim/dirs/tmp | |
| silent !mkdir -p silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
| let vim_plug_just_installed = 1 | |
| endif |
| ## you may need sudo permission to execute some commands or swith to root | |
| # if installed old version by yum, remove it first | |
| sudo yum remove -y tmux libevent libevent-devel libevent-headers | |
| # install deps | |
| sudo yum install -y gcc kernel-devel make ncurses-devel | |
| # create temp dir | |
| mkdir /tmp/for-latest-tmux |
| import os | |
| import os.path | |
| import shutil | |
| ans = raw_input('[p]rint/[d]elete ?') | |
| if ans == 'p': | |
| debug = False | |
| elif ans == 'd': | |
| debug = True | |
| else: |
| # -*- coding: utf-8 -*- | |
| from bottle import get, post, request, redirect, run | |
| @get('/') | |
| def index(): | |
| return ''' | |
| <div style="text-align:center;padding:200px;"> | |
| <h1>女友的話處處是坑,讓我們來幫你翻譯吧!</h1> | |
| <br /> | |
| <form action="/" method="post"> |
| var scripts = [ | |
| 'https://code.jquery.com/jquery-2.1.4.min.js', | |
| 'http://bgrins.github.io/devtools-snippets/snippets/console-save/console-save.js', | |
| 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js' | |
| ] | |
| for (i=0; i<scripts.length; i=i+1) { | |
| var script = document.createElement('script'); | |
| script.src = scripts[i]; | |
| document.getElementsByTagName('head')[0].appendChild(script); |
| #!/bin/bash | |
| # ref: http://stackoverflow.com/a/12254656/1105489 | |
| # find-out-what-is-using-your-swap.sh | |
| # -- Get current swap usage for all running processes | |
| # -- | |
| # -- rev.0.3, 2012-09-03, Jan Smid - alignment and intendation, sorting | |
| # -- rev.0.2, 2012-08-09, Mikko Rantalainen - pipe the output to "sort -nk3" to get sorted output | |
| # -- rev.0.1, 2011-05-27, Erik Ljungstrom - initial version | |
| <div id="navbar" class="navbar-collapse collapse"> | |
| <ul class="nav navbar-nav"> | |
| <li class="active"><a href="#">Home</a></li> | |
| <li><a href="#">About</a></li> | |
| <li><a href="#">Contact</a></li> | |
| <li class="dropdown"> | |
| <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a> | |
| <ul class="dropdown-menu"> | |
| <li><a href="#">Action</a></li> | |
| <li><a href="#">Another action</a></li> |
| # vim:ft=zsh ts=2 sw=2 sts=2 | |
| # | |
| # agnoster's Theme - https://gist.github.com/3712874 | |
| # A Powerline-inspired theme for ZSH | |
| # | |
| # # README | |
| # | |
| # In order for this theme to render correctly, you will need a | |
| # [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). | |
| # |