Skip to content

Instantly share code, notes, and snippets.

View askdaddy's full-sized avatar

Seven Chan askdaddy

  • Internet
View GitHub Profile
@askdaddy
askdaddy / compile.sh
Created August 7, 2018 10:17 — forked from bigtan/compile.sh
shadowsocks-libev static build
apt-get update && apt-get install build-essential automake autoconf libtool git clang -y && export CC=clang
ver=2.6.0
wget --no-check-certificate https://tls.mbed.org/download/mbedtls-$ver-gpl.tgz
tar zxf mbedtls-$ver-gpl.tgz
cd mbedtls-$ver
sed -i "s/DESTDIR=\/usr\/local/DESTDIR=\/projects\/dists\/mbedtls/g" Makefile
LDFLAGS=-static make install
cd ..
#!/bin/sh
# cross & static compile shadowsocks-libev
PCRE_VER=8.41
PCRE_FILE="http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VER.tar.gz"
MBEDTLS_VER=2.6.0
MBEDTLS_FILE="https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz"
@askdaddy
askdaddy / rig.sh
Last active May 31, 2018 10:14
xmrig-dockerfile
#!/bin/sh
# MyMonero
# >>>> 46j2TLADJQU4Ry4eRNP7iSiZchSj7qc5ZVYdasnhwwVmELrdrRQwVDP7zf25PdXoJfZgGH3eeWFyQaLbUhXMwS7T3ujaCiK
WALLET=46j2TLADJQU4Ry4eRNP7iSiZchSj7qc5ZVYdasnhwwVmELrdrRQwVDP7zf25PdXoJfZgGH3eeWFyQaLbUhXMwS7T3ujaCiK
if [ "_${RIG_NAME}" == "_" ]; then
RIG_NAME=_$(hostname)
fi
@askdaddy
askdaddy / GitHub curl.sh
Created May 10, 2018 10:51 — forked from Integralist/GitHub curl.sh
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
@askdaddy
askdaddy / ansible-pull.yml
Created May 2, 2018 09:22
ansible-pull setup
# ansible-pull setup
#
# on remote hosts, set up ansible to run periodically using the latest code
# from a particular checkout, in pull based fashion, inverting Ansible's
# usual push-based operating mode.
#
# This particular pull based mode is ideal for:
#
# (A) massive scale out
# (B) continual system remediation
@askdaddy
askdaddy / tmux-cheatsheet.markdown
Created April 20, 2018 00:27 — forked from ryerh/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表

Tmux 快捷键 & 速查表

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

tmux at [-t 会话名]
@askdaddy
askdaddy / multiple_ssh_setting.md
Created March 23, 2018 02:51 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@askdaddy
askdaddy / DockerCE-CentOS7.md
Last active March 2, 2018 03:12
Install Docker CE using the repository on CentOS 7.2

Offical docs

  • Install requirements
yum install -y yum-utils device-mapper-persistent-data lvm2
  • Add repo
@askdaddy
askdaddy / smokeping.conf
Last active January 2, 2018 14:19
Supervisor_smokeping_slave_Config
[program:smokeping]
command=/usr/sbin/smokeping --master-url=http://ping.yuanjin.io:8088/smokeping/smokeping.fcgi --shared-secret=/var/lib/smokeping/secret --cache-dir=/var/lib/smokeping --slave-name=sha0Seven --nodaemon
stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.err
stopsignal=6
@askdaddy
askdaddy / tmux-cheatsheet.markdown
Created December 14, 2017 05:13 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname