Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
--- | |
:backtrace: false | |
:bulk_threshold: 1000 | |
:sources: | |
- https://ruby.taobao.org/ | |
:update_sources: true | |
:verbose: true | |
benchmark: false | |
gem: "--no-document" |
#! /bin/bash | |
sudo -i | |
echo "Create '/swapfile'" | |
fallocate -l "$1G" /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo "" |
class PingPool | |
def initialize(count) | |
@count = count | |
DATA.each_line do |line| | |
line = line.strip | |
next if line.start_with? '#' | |
next if line == '' | |
if line.index("#(") | |
self.batch /#(\(.*\))/, line | |
elsif line.index("#[") |
#! /bin/bash | |
cd ~ | |
su -c "echo 'export LC_ALL=en_US.UTF-8' >> /etc/profile" | |
source /etc/profile | |
sudo apt-get update | |
sudo apt-get install git curl build-essential openssh-server libmysqlclient-dev libpython2.7-dev \ | |
python-pip zsh | |
# sudo pip install ipython | |
curl -L install.ohmyz.sh|bash |
defmodule Conn do | |
def test do | |
stat = "select * from users limit 10;" | |
:emysql.add_pool :demo_pool, [ | |
size: 1, | |
user: 'root', | |
password: 'root', | |
database: 'demo', | |
encoding: :utf8 # you will need this |
defmodule Conn do | |
def test do | |
{ok, client} = :cqerl.new_client({}) | |
{ok, result} = :cqerl.run_query(client, "SELECT * FROM demodb.users;") | |
rows = :cqerl.all_rows(result) | |
end | |
end |