Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# vim: set ft=sh fdm=manual ts=2 sw=2 sts=2 tw=85 et:
# Toolchains for remote deploy
#
# eg: ./deploy.sh -f ./dist.tgz \
# -h 10.10.1.177,10.10.1.178 -u apps -p "abc@foo" \
# --server-dir /var/node-apps/pre-analysys-portal.3001 \
# --boot ./boot.sh
#
@allex
allex / ssh.py
Last active March 24, 2017 06:02
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# A SSH Client with username and password arguments extends.
#
# eg: ssh root@host -p PASSWD "COMMAND"
#
# Author: Allex Wang <http://iallex.com/> ([email protected])
# MIT Licensed
#
@allex
allex / git-pack
Last active December 20, 2021 01:52
#!/bin/bash
# vim: set ft=sh fdm=manual ts=2 sw=2 sts=2 tw=85 et:
# ================================================
# Git packer for archive project to tarball
#
# Installation
# > curl -sL https://git.io/fhjIF >/usr/bin/git-pack
#
# Usage
@allex
allex / index.html
Created February 17, 2017 09:00 — forked from oddlyzen/index.html
Cool CSS Flicker Animation - from http://ringshia.com
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="Pratik Ringshia's website">
<meta name="keywords" content="pratik ringshia, pratik, ringshia, personal, website">
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<style type="text/css">
@allex
allex / nginxvarcore.md
Created December 28, 2016 06:35 — forked from esfand/nginxvarcore.md
Nginx Variables

Embedded Variables

The ngx_http_core_module module supports embedded variables with names matching the Apache Server variables. First of all, these are variables representing client request header fields, such as $http_user_agent, $http_cookie, and so on. Also there are other variables:

  • $arg_name
    argument name in the request line
# ~/.gitconfig
#
# Github: https://raw.githubusercontent.com/allex/dotfiles/master/.gitconfig
#
# Allex's personal git config <http://iallex.com>
#
# NOTE: This is a common config file, localize config to `~/.gitconfig.local`
#
# Installation:
# sh> wget -O ~/.gitconfig https://git.io/fAHS5
/**
* Helper module for angular http extends with localStorage cache enabled.
*
* @author Allex Wang <http://iallex.com>
*
* Last Modified: Wed Dec 14, 2016 14:26
* GistID: 32752939b4f882b50085918274f6a3b6
* GistURL: https://gist.github.com/32752939b4f882b50085918274f6a3b6
*
* @example
@allex
allex / .tmux.conf
Last active October 18, 2017 06:05
# vim: set ft=sh:
#
# Personal tmux configuration (~/.tmux.conf)
# Author: Allex Wang ([email protected])
#
# Last Modified: Wed Oct 18, 2017 14:04
#
# GistID: e10579af50d7bb95b3dfaaa567961502
# GistURL: https://gist.github.com/e10579af50d7bb95b3dfaaa567961502
#
/**
* A simple pagination.
*
* @author Allex Wang ([email protected])
*
* @example
*
* ```js
* var pagination = new Pagination('#pager', {
* pageSize: 10,
@allex
allex / pptp
Last active October 9, 2016 09:49
#!/bin/sh
#
# pptp Automatically Detect and Restart Linux PPTP Client
#
# chkconfig: 2345 55 25
#
# author: Allex Wang ([email protected])
#
# */1 * * * * /etc/init.d/pptp start test >> /var/log/pptp_pinger.log 2>&1
#