Skip to content

Instantly share code, notes, and snippets.

@tianying484
tianying484 / jmeter-sha256
Created July 6, 2018 09:12 — forked from lishenzhi/jmeter-sha256
jmeter sha256 signature
// beanshell preprocessor
import org.apache.commons.httpclient.auth.DigestScheme; // necessary imports
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.jmeter.protocol.http.control.Header;
long timestamp = System.currentTimeMillis() / 1000L;
String clientID = "***";
String clientSecret = "****";
@tianying484
tianying484 / starUML.md
Created June 17, 2018 22:14 — forked from trandaison/starUML.md
Get full version of StarUML

StarUML

Download: StarUML.io

Crack

Source: jorgeancal

After installing StartUML successfully, modify LicenseManagerDomain.js as follow:

/**
@tianying484
tianying484 / Twelve_Go_Best_Practices.md
Created November 13, 2017 23:08 — forked from pzurek/Twelve_Go_Best_Practices.md
Twelve Go Best Practices
@tianying484
tianying484 / redis.conf
Created March 4, 2017 09:28 — forked from ehazlett/redis.conf
Redis supervisor config
[program:redis]
command=/usr/local/bin/redis-server /storage/redis_data/redis.conf
directory=/storage/redis_data
user=root
autostart=false
stopsignal=QUIT

ffmpeg Cheatsheet

  • Join TS Files
  • Convert TS to MP4
  • Download Online AES-128 Encrypted HLS video
  • Convert Video to GIF
  • Extract Audio and Convert it to MP3
  • Burn Subtitles into Video

Join TS Files

@tianying484
tianying484 / main.yml
Created February 25, 2017 15:06 — forked from bjallen/main.yml
ansible mysql percona task
---
- name: Add Percona apt signing key
sudo: yes
apt_key: keyserver=keys.gnupg.net id=1C4CBDCDCD2EFD2A state=present
- name: Add Percona repository
sudo: yes
apt_repository: repo='deb http://repo.percona.com/apt trusty main' state=present
- name: Add Percona source repository

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

cd ~/Downloads

wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb

dpkg -i zabbix-release_3.2-1+xenial_all.deb

apt-get update

should add /etc/apt/sources.list.d/zabbix.list

@tianying484
tianying484 / ffmpeg.md
Created February 11, 2017 21:59 — forked from zhaoxiaobao/ffmpeg.md
ffmpeg视频合并、格式转换、截图

使用ffmpeg合并MP4文件

ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"
@tianying484
tianying484 / initial_percona_tokudb.sh
Created February 8, 2017 02:33 — forked from duan-li/initial_percona_tokudb.sh
Ubuntu 14.04 LTS Percona server and TokuDB setup
#!/bin/bash
# ref-main: https://www.percona.com/doc/percona-server/5.5/installation/apt_repo.html
# ref-main: https://www.percona.com/doc/percona-server/5.6/tokudb/tokudb_installation.html
# ref: https://www.digitalocean.com/community/tutorials/how-to-install-a-fresh-percona-server-or-replace-mysql
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
echo "Type your percona server root pasword:"