Skip to content

Instantly share code, notes, and snippets.

View banjin's full-sized avatar
🏠
Working from home

songhm banjin

🏠
Working from home
View GitHub Profile
@banjin
banjin / setup-python3.8-via-ppa.sh
Created November 12, 2021 08:07 — forked from ptantiku/setup-python3.8-via-ppa.sh
Setup Python3.8 in Ubuntu Xenial (16.04 LTS). The python version was fixed at Python 3.5.1
#!/bin/sh
# install PPA
sudo add-apt-repository ppa:deadsnakes/ppa
# update and install
sudo apt update
sudo apt install python3.8 python3.8-dev python3.8-venv
# setup alternatives
# Ubuntu
sudo apt-get -y install git gcc make libpcap-dev
git clone https://github.com/robertdavidgraham/masscan
cd masscan/
make
sudo make install
@banjin
banjin / MySQL_5-7_macOS.md
Created January 12, 2019 14:09 — forked from robhrt7/MySQL_5-7_macOS.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@banjin
banjin / kennethreitz.zsh-theme
Created September 15, 2018 03:29 — forked from kennethreitz/kennethreitz.zsh-theme
"kennethreitz" theme for oh-my-zsh. Designed for Operator Mono. Supports virtualenvs & git.
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='$(virtualenv_prompt_info)%{%}%{$fg[green]%}%c \
$(git_prompt_info)\
\
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[yellow]%}("
@banjin
banjin / git_toturial
Last active January 25, 2018 03:52 — forked from guweigang/git_toturial
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
@banjin
banjin / vue_validation.js
Created August 11, 2016 10:59 — forked from pulading1988/new_gist_file.js
vue.js写的一个表单验证示例
var mobileRE = /^(((13[0-9]{1})|(14[57]{1})|(15[0-9]{1})|(17[678]{1})|(18[0-9]{1}))+\d{8})$/;
var passwordRE = /^[A-Za-z0-9]{6,20}$/;
var BASE_PATH = '${basePath}';
var j_captchaUrl = '${basePath}/jcaptcha'; // 获取验证码的后端地址
var app = new Vue({
el: '#app',
data: {
mobile: '',
j_captcha: '',