Skip to content

Instantly share code, notes, and snippets.

View ferstar's full-sized avatar
🎯
Focusing

J. F. Zhang ferstar

🎯
Focusing
View GitHub Profile
@ferstar
ferstar / install-2.17.sh
Created June 28, 2016 07:19
debian version of bcl2fastq without examples
sudo apt-get update
wget http://support.illumina.com/content/dam/illumina-support/documents/downloads/software/bcl2fastq/bcl2fastq2-v2.17.1.14-Linux-x86_64.rpm
sudo apt-get install alien --assume-yes
sudo alien bcl2fastq2-v2.17.1.14-Linux-x86_64.rpm
sudo dpkg -i bcl2fastq2_0v2.17.1.14-2_amd64.deb
@ferstar
ferstar / flask-upload
Created March 18, 2016 05:56 — forked from dAnjou/flask-upload
Flask upload example
<VirtualHost *>
ServerName example.com
WSGIDaemonProcess www user=max group=max threads=5
WSGIScriptAlias / /home/max/Projekte/flask-upload/flask-upload.wsgi
<Directory /home/max/Projekte/flask-upload>
WSGIProcessGroup www
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
@ferstar
ferstar / AESCipher.py
Last active March 1, 2016 08:38 — forked from swinton/AESCipher.py
Encrypt & Decrypt using PyCrypto AES 256From http://stackoverflow.com/a/12525165/119849
import base64
import hashlib
from Crypto import Random
from Crypto.Cipher import AES
class AESCipher(object):
"""
A classical AES Cipher. Can use any size of data and any size of password thanks to padding.
@ferstar
ferstar / decorator.py
Created February 18, 2016 09:57
廖雪峰博客 Python3 教程练习
'''装饰器
在函数调用的前后打印出'begin call'和'end call'的日志;
即支持@log又支持@log('xxx')的调用
'''
import functools
def log(arg):
def decorator(func=arg):
@ferstar
ferstar / install-mongodb.sh
Created January 25, 2016 14:13 — forked from w0rldart/install-mongodb.sh
Installing MongoDB on Ubuntu 15.04
#!/bin/sh
##
## Bash install script for mongo 3.2 for Ubuntu 15.04, because of
## the replacement of upstart with systemd
##
## - AUTHOR: Alexandru Budurovici <https://w0rldart.com>
## - VERSION: 1.0
##
@ferstar
ferstar / gist:5efc8ed0fe16beccc9e9
Last active January 23, 2016 13:41 — forked from robertmarsal/gist:9feaa9150926efa4175a
Install f.lux on Ubuntu 14.10
sudo apt-get install python-glade2 python-appindicator
git clone https://github.com/Kilian/f.lux-indicator-applet.git
cd f.lux-indicator-applet
chmod +x setup.py
sudo ./setup.py install
sudo chmod +x /usr/local/bin/xflux
fluxgui
@ferstar
ferstar / bakmysql.sh
Last active January 13, 2016 13:22
scripts about mysql
#!/bin/sh
# Name:bakmysql.sh
# This is a ShellScript For Auto DB Backup and Delete old Backup
#
backupdir=/home/sqlbak
mysql_bin_dir=/usr/bin
time=`date +%Y%m%d`
dbname1=
dbname2=
username=
@ferstar
ferstar / flash.sh
Last active September 20, 2015 08:09 — forked from fcicq/flash.sh
u-boot flash for 128k uboot with MAC/WPS info in 0x1fc00/0x1fe00
#!/bin/sh
#high chance need have a change ...
if [ ! $# -eq 2 ]; then
echo "usage: $0 UBOOTFILE MD5"
exit
fi
UBOOT_NAME=$1
MD5SUM_SHOULD_BE=$2
@ferstar
ferstar / count_times.py
Last active August 29, 2015 14:26
统计差异时间出现次数
#!/usr/bin/env python3
import os
log_path = "/tmp/log"
# 读取log内容
with open(log_path, 'r') as f:
read_data = f.read()
@ferstar
ferstar / gist:624777a6222be4776052
Created June 4, 2015 02:11
Something about ROS on Raspberry Pi2.

国外友人做的树莓派ROS镜像:

镜像

linux下随意伸缩img镜像大小的教程:

教程