Skip to content

Instantly share code, notes, and snippets.

View askdaddy's full-sized avatar

Seven Chan askdaddy

  • Internet
View GitHub Profile
@askdaddy
askdaddy / install-teamcity.md
Created November 23, 2017 02:51 — forked from uglide/install-teamcity.md
Install TeamCity 9.1.6 on Ubuntu with Nginx
@askdaddy
askdaddy / log.js
Created November 26, 2017 12:15 — forked from vikas5914/log.js
Custom Logger Library with winston
var winston = require('winston')
// set default log level.
var logLevel = 'info'
// Set up logger
var customColors = {
trace: 'white',
debug: 'green',
info: 'blue',
@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
@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 / 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 / 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"
#!/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 / 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 ..
@askdaddy
askdaddy / svn_to_git.rst
Created June 5, 2019 00:56 — forked from epicserve/svn_to_git.rst
Convert SVN Repositories to Git Repositories

Convert SVN Repositories to Git Repositories

This guide on how to convert an SVN repository to a git repository was mostly taken from John Albin Wilkins post on Converting a Subversion repository to Git.

1. Retrieve a list of all Subversion committers

:

@askdaddy
askdaddy / ssh-copy-github
Created December 2, 2019 12:31
Import your ssh keys from github
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ssh-copy-github
===============
@author: sang
Import all your ssh keys from github to `authorized_keys`.
Performs deduplication over public keys.