Skip to content

Instantly share code, notes, and snippets.

@qiukun
qiukun / end2end.markdown
Last active December 18, 2019 07:34
End2End
@qiukun
qiukun / ansible_pg.md
Last active November 7, 2019 06:41
Ansible quick
@qiukun
qiukun / pgviaansible.sh
Last active July 27, 2019 10:03
phoenix on #CloudStudio
pip install --user ansible
ansible-playbook -i inventory --connection=local postgresql.yml
@qiukun
qiukun / ringer.rb
Created October 22, 2015 07:22
用联通邮箱报警
#! /usr/bin/ruby
require 'net/smtp'
email = ''
passwd = ''
subject = $*[0] || "Ring Ring"
text = $*[1] || "An alarm has been triggered."
message = <<MESSAGE_END
From: Ringer <#{email}>
@qiukun
qiukun / rails-on-coding.sh
Last active July 6, 2019 01:57
Rails on #CloudStudio
sudo apt-get update -qq
sudo apt-get install -qq software-properties-common
sudo apt-add-repository -y ppa:brightbox/ruby-ng
sudo apt-get update -qq
sudo apt-get install -qq build-essential ruby2.6{,-dev} zlib1g-dev libsqlite3-dev
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
# cat >> ~/.gemrc <<EOF
require 'test/unit'
require './tiny_frp.rb'
module TinyFRP
module UnitTest
module Util
def lift(&proc)
TinyFRP::Lift.new(&proc)
end
@qiukun
qiukun / jdk8.sh
Last active August 29, 2015 14:10 — forked from leon/Dockerfile
#
# - install jdk8 from oracle
#
add-apt-repository -y ppa:webupd8team/java
apt-get update
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
apt-get install -y oracle-java8-installer
apt-get install oracle-java8-set-default
@qiukun
qiukun / searcher.coffee
Last active April 15, 2019 12:24
各 bt 搜索器
# |kw| as keyword
sites =
neubt: "//neubt.com/search.php?mod=forum&searchid=23034&orderby=lastpost&ascdesc=desc&searchsubmit=yes&kw=|kw|"
byrbt: "//bt.byr.cn/torrents.php?incldead=0&spstate=0&inclbookmarked=0&search=|kw|&search_area=0&search_mode=0"
ptbt: "//pt.sjtu.edu.cn/torrents.php?incldead=0&spstate=0&inclbookmarked=0&picktype=0&search=|kw|&search_area=0&search_mode=0"
search = (keyword) ->
window.open v.replace '|kw|', keyword for _, v of sites
return
@qiukun
qiukun / setup.sh
Created February 15, 2013 06:33
文件不要带 . ln 过去的时候会加上 . 的
#!/bin/sh
cd `dirname $0`
F=`pwd |sed -e "s#$HOME/\?##"`
for P in *
do
# skip setup
if [ "$P" = "setup.sh" ]; then continue; fi
@qiukun
qiukun / gist:3000173
Created June 26, 2012 23:37
send mail to tumblr by coffeescript and nodemailer
nodemailer = require "nodemailer"
smtpTransport = nodemailer.createTransport "SMTP",
service: "Gmail"
auth:
user:
pass:
mail =
from: ""