Skip to content

Instantly share code, notes, and snippets.

@alvin2ye
alvin2ye / a.html
Last active January 22, 2017 01:37
test.html
111
<script charset="utf-8" type="text/javascript" src="https://wpa.b.qq.com/cgi/wpa.php?key=XzkzODA3OTI4Nl80MjY2ODdfNDAwNzExODk4OV8"></script>
@alvin2ye
alvin2ye / a.tpl
Created September 9, 2016 15:40
Webpack artTemplate arale-dialog
<div style="padding: 16px;">
<h2>设置专题</h2>
<form class="form-inline" id="frmSetProject">
<select class="form-control">
{{each options as option i}}
<option value="">空</option>
<option value="{{option.id}}">{{option.name}}</option>
{{/each}}
</select>
<input type="submit" value="确定" class="btn btn-sm btn-primary">
@alvin2ye
alvin2ye / install.sh
Created June 12, 2016 12:52 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@alvin2ye
alvin2ye / ubuntu_1404_ruby_ree_187.bash
Last active June 6, 2016 07:24
ubuntu_1404_ruby_ree_187.bash
apt-get install -y wget build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev
cd && mkdir install_ruby_ree_187 && cd install_ruby_ree_187
curl -O http://agi-public3.qiniudn.com/20160606105850/ruby-enterprise-1.8.7-2012.02.tar.gz
tar xzf ruby-enterprise-1.8.7-2012.02.tar.gz && cd ruby-enterprise-1.8.7-2012.02
cd ./source
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/tcmalloc.patch' && \
patch -p1 < tcmalloc.patch && \
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/stdout-rouge-fix.patch' && \
patch -p1 < stdout-rouge-fix.patch && \
alert(2)
{"RetCode":0,"Action":"DescribeUHostInstanceResponse","UHostSet":[{"UHostId":"uhost-nn1asj","UHostType":"Normal","OsType":"Linux","ImageId":"cec2b3cd-8fa2-41ab-8f1c-bae4b254f078","BasicImageId":"uimage-xqxgvr","BasicImageName":"Ubuntu 14.04 32位","Tag":"超达 PIE 服务器","Name":"s152","State":"Running","CreateTime":1420983089,"ChargeType":"Month","ExpireTime":1423661490,"CPU":1,"Memory":2048,"DiskSet":[{"Type":"Boot","DiskId":"cec2b3cd-8fa2-41ab-8f1c-bae4b254f078","Drive":"/dev/sda","Size":20}],"IPSet":[{"Type":"Private","IP":"10.4.24.222"},{"Type":"Telecom","IPId":"eip-xrnw1m","IP":"183.131.76.95","Bandwidth":2}]},{"UHostId":"uhost-13mlhb","UHostType":"Normal","OsType":"Linux","ImageId":"dbcac69d-88b0-4637-9564-030dc3aaf68f","BasicImageId":"uimage-3mndzp","BasicImageName":"Ubuntu 14.04 64位","Tag":"鹿城建设","Name":"s149","State":"Running","CreateTime":1419820341,"ChargeType":"Month","ExpireTime":1422498741,"CPU":1,"Memory":2048,"DiskSet":[{"Type":"Boot","DiskId":"dbcac69d-88b0-4637-9564-030dc3aaf68f","Drive":"/dev/sda"
; Summary: Proxy Switchy! Exported Rule List
; Date: Sunday, May 15, 2011
; Website: http://bit.ly/proxyswitchy
#BEGIN
[wildcard]
*://192.168.1.*
*://www.amazon.com/*
*://www.bbc.co.uk/*
@alvin2ye
alvin2ye / install ree on ubuntu 14.04.md
Created June 3, 2014 15:06
Ubuntu 14.04 Install Ruby1.8.7 OR REE has Error "timeout.rb:60: [BUG] Segmentation fault"

失败原因是gcc 版本太高

gcc > 4.6 的版本,安装前需要

export CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls"

已经编译的要删除重新编译。

@alvin2ye
alvin2ye / a.md
Last active January 3, 2016 20:29
abc
  • aa
  • bb
  • cc

abc bold dd abc dd dd

RAILS_ROOT = File.join(File.dirname(__FILE__), '..')
ENV["RAILS_ENV"] ||= "development"
def generic_monitoring(w, options = {})
w.start_if do |start|
start.condition(:process_running) do |c|
c.interval = 10.seconds
c.running = false
end