Skip to content

Instantly share code, notes, and snippets.

😐
Haha

vamdt vamdt

😐
Haha
Block or report user

Report or block vamdt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vamdt
vamdt / regex.js
Created Feb 12, 2015
Common regex
View regex.js
// 中文 英文 数字
var chinese_english_num_re = /[\u4e00-\u9fa5a-zA-Z0-9]+/;
View install_font.sh
#!/bin/bash
sudo apt-get install -y xfonts-utils fontconfig
cd `dirname $0`
mkdir msyh
cd msyh
curl -O https://coding.net/u/vamdt/p/fonts/git/raw/master/msyh.ttf
curl -O https://coding.net/u/vamdt/p/fonts/git/raw/master/msyhbd.ttf
cd ..
sudo cp -r ./msyh /usr/share/fonts/truetype/
@vamdt
vamdt / ci_php_lint.sh
Last active Aug 29, 2015
php lint run in ci(jenkins)
View ci_php_lint.sh
#!/usr/bin/env bash
# APP_ROOT/deploy/ci_php_lint.sh
cd $(dirname $0)
cd ..
exit_code=0
for i in $(git ls-files --ignored --exclude='**/*.php')
do
View php_info_in_cli_example.sh
#!/usr/bin/env bash
# eg, check gd extensions
php -r 'phpinfo();' | grep -A 20 gd$
@vamdt
vamdt / go-update.sh
Created Sep 14, 2015
go update script
View go-update.sh
#!/usr/bin/env bash
usage() {
printf 'go-update.sh go$VERSION.$OS-$ARCH.tar.gz\n'
exit 1
}
[ -z "$1" ] && usage
go_pkg_name="$1"
@vamdt
vamdt / cmder_aliases
Last active Jul 30, 2016
cmder\config\aliases
View cmder_aliases
e.=explorer .
gl=git log --oneline --all --graph --decorate $*
ls=ls --color --show-control-chars $*
pwd=cd
clear=cls
history=cat %CMDER_ROOT%\config\.history
unalias=alias /d $1
g=git $*
gs=git status $*
View Edit_With_Emacs.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell]
[HKEY_CLASSES_ROOT\*\shell\openwemacs]
@="&Edit with Emacs"
[HKEY_CLASSES_ROOT\*\shell\openwemacs\command]
@="E:\\tools\\emacs\\bin\\runemacs.exe \"%1\""
[HKEY_CLASSES_ROOT\Directory\shell\openwemacs]
@="Edit &with Emacs"
[HKEY_CLASSES_ROOT\Directory\shell\openwemacs\command]
View run_jmeter.sh
#!/usr/bin/env bash
JMETER_PATH=/path/to/jmeter
JMETER_PLAN_DIR=/path/to/jmx
set -xe
cd $(dirname $0)
pwd
for file in $(ls $JMETER_PLAN_DIR); do
@vamdt
vamdt / telnet_send_email.sh
Last active Mar 17, 2016
telnet send mail, for test
View telnet_send_email.sh
telnet mail.host 25
ehlo mail.host #握手
mail from:<test@mail.host> #发送方
rcpt to: <testing@target.mail.host> #收件方
data #正文
TO: testing@target.mail.host
FROM: test@mail.host
SUBJECT: telnet test
test,aha
@vamdt
vamdt / SendMail.java
Last active Mar 21, 2016
Send mail use java mail api
View SendMail.java
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import java.util.*;
public class SendMail {
You can’t perform that action at this time.