prerequisite
python3
requests
If your computer not install requests lib yet
// | |
// this code use the idea from this https://gist.github.com/hvoecking/10772475 | |
// list of xss payload https://github.com/payloadbox/xss-payload-list | |
package main | |
import ( | |
"fmt" | |
"log" | |
"reflect" |
### INSTALLATION NOTES ### | |
# 1. Install Homebrew (https://github.com/mxcl/homebrew) | |
# 2. brew install zsh | |
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh) | |
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace | |
# 5. Install iTerm2 | |
# 6. In iTerm2 preferences for your profile set: | |
# Character Encoding: Unicode (UTF-8) | |
# Report Terminal Type: xterm-256color | |
# 7. Put itunesartist and itunestrack into PATH |
" better white space | |
let g:better_whitespace_enabled=1 | |
let g:strip_whitespace_on_save=1 | |
let g:strip_whitespace_confirm=0 |
#!/bin/bash | |
clion() { | |
find ~/.config/JetBrains -mindepth 2 -maxdepth 2 -type d -wholename '*CLion*/eval' -exec rm -rf {} \; | |
find ~/ -mindepth 3 -maxdepth 3 -type d -wholename '*.CLion*/eval' -exec rm -rf {} \; | |
sed --quiet -i -E -e 's/.*<property.*evlsp.*//g' -e '/^$/d' ~/.config/JetBrains/CLion*/options/other.xml ~/.CLion*/config/options/other.xml 2>/dev/null | |
} | |
webstorm() { | |
find ~/.config/JetBrains -mindepth 2 -maxdepth 2 -type d -wholename '*WebStorm*/eval' -exec rm -rf {} \; |
call plug#begin() | |
Plug 'fatih/vim-go' | |
Plug 'fatih/molokai' | |
Plug 'AndrewRadev/splitjoin.vim' | |
Plug 'SirVer/ultisnips' | |
Plug 'ctrlpvim/ctrlp.vim' | |
Plug 'preservim/nerdtree' | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
Plug 'junegunn/fzf.vim' | |
Plug 'itchyny/lightline.vim' |
package main | |
import ( | |
"context" | |
"log" | |
"net/http" | |
"time" | |
"github.com/gin-gonic/gin" | |
) |
// 1_wg_example.go | |
package main | |
import ( | |
"errors" | |
"fmt" | |
"sync" | |
"time" | |
) |
prerequisite
python3
requests
If your computer not install requests lib yet
/* | |
credit to this great article | |
https://www.2ndquadrant.com/en/blog/postgresql-anti-patterns-read-modify-write-cycles/ | |
*/ | |
package main | |
import ( | |
"fmt" | |
"github.com/jmoiron/sqlx" |
#!/usr/bin/env bash | |
# | |
# USAGE: | |
# sudo ./add_swap.sh 4G | |
# | |
# SOURCE: | |
# https://linuxize.com/post/how-to-add-swap-space-on-ubuntu-18-04/ | |
# | |
fallocate -l $1 /swapfile | |
chmod 600 /swapfile |