Skip to content

Instantly share code, notes, and snippets.

@biaocy
biaocy / change_java_home.bat
Created May 19, 2017 05:48
change java home
@echo off
rem This batch program will switch java env version in 1.6/1.8
set @v1_6=C:\Program Files (x86)\Java\jdk1.6.0_45
set @v1_8=C:\Program Files\Java\jdk1.8.0_121
set @cur=%JAVA_HOME%
echo Current path is %@cur%
@biaocy
biaocy / image-proxy.conf
Created June 20, 2016 17:27 — forked from tmaiaroto/image-proxy.conf
Nginx Image Filter Resize Proxy Service
# Feel free to change this path of course (and keys_zone value as well, but also change the usage of it below).
proxy_cache_path /var/www/cache/resized levels=1:2 keys_zone=resizedimages:10m max_size=1G;
# Gzip was on in another conf file of mine...You may need to uncomment the next line.
#gzip on;
gzip_disable msie6;
gzip_static on;
gzip_comp_level 4;
gzip_proxied any;
# Again, be careful that you aren't overwriting some other setting from another config's http {} section.
@biaocy
biaocy / weibo4b.js
Last active September 9, 2017 08:28
block weibo keyword
// ==UserScript==
// @name weibo4b
// @namespace http://tampermonkey.net
// @version 0.3
// @description 屏蔽匹配关键字的微博
// @author biaocy
// @match https://weibo.com/*
// @grant none
// ==/UserScript==
@biaocy
biaocy / regenerate_persistent_net_rules.sh
Created June 22, 2015 07:51
Centos 6 mac address unmatch solution
#delete persistent net rules
rm /etc/udev/rules.d/70-persistent-net.rules
#reboot, then it will regenerate
reboot
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@biaocy
biaocy / 0_reuse_code.js
Created June 14, 2014 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console