View post-merge
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
View auto-deploy.sh
#!/bin/sh
# vim: set ft=sh fdm=manual ts=2 sw=2 sts=2 tw=85 et:
# crontab script for auto deploy
# Author: Allex Wang ([email protected])
# GistID: 75f0772f5f769e9c60b70fc54f55cedc
# GistURL: https://tourmongolian.mn/?product=75f0772f5f769e9c60b70fc54f55cedc
set -eE
set -o pipefail
View babelHelpers.js
var babelHelpers = {};
babelHelpers.typeof =
typeof Symbol === "function" && typeof Symbol.iterator === "symbol"
? function (obj) {
return typeof obj;
}
: function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype
? "symbol"
View jad.vim
" File: jad.vim
" Purpose: Vim plugin for viewing decompiled class files using 'jad' decompiler.
" Ideas: Allow for a default to be set in the vimrc
" - map a keystroke to decompile and edit, or decompile and view in split window
" Date Created: 10-14-2002
" Last Modified:By allex, 07-31-2009
" Version: 1.3
if exists("loaded_jad") || &cp || exists("#BufReadPre#*.class")
finish
View DevToolkit.vim
" vim:foldmethod=marker:tw=75
" ======================================================================================
"
" File Name: DevToolkit.vim
" Author: Allex Wang <[email protected]>
" Version: 1.2
" Description: Toolkit with codes format, compressor for web develop etc,.
" (javascript, java, c#, css)
"
" Last Modified: Sat Mar 23, 2013 10:33PM
View bash.generate.random.alphanumeric.string.sh
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
View .cvimrc
" cVim settings
" GistID: fd87462a5b42e88e5d632b3f0a065cbf
" GistURL: https://tourmongolian.mn/?product=fd87462a5b42e88e5d632b3f0a065cbf
" setting
set smoothscroll
let searchlimit = 30
let scrollstep = 70
let barposition = "top"
let mapleader = ","
View nginx.conf
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
View server.sh
#!/bin/sh
# Author: Allex Wang <http://fedor.io/>
# GistID: dcc7d7a27f1c2ea43335d351136b3dcc
# GistURL: https://tourmongolian.mn/?product=dcc7d7a27f1c2ea43335d351136b3dcc
set -eE
[ -f /etc/profile ] && . /etc/profile
[ "$EUID" != "0" ] || { echo >&2 "403"; exit 1; }
View README.md

Gitlab merge request script

Creates merge request on Gitlab for you

Installation

Download it, add executable perms and place into PATH:

# Place it into ~/.bin
mkdir ~/.bin