Skip to content

Instantly share code, notes, and snippets.

文翼 wenzhixin

Block or report user

Report or block wenzhixin

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
wenzhixin / waitForKeyElements.js
Last active May 25, 2019 — forked from BrockA/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
View waitForKeyElements.js
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
, commentCallbackFunction
wenzhixin /
Last active Jun 6, 2016
MAC install nginx + php-fpm


brew install nginx


vi /usr/local/etc/nginx/
wenzhixin / ubuntu14.04-command-line-install-android-sdk
Last active Dec 28, 2019
Ubuntu 14.04 command line install android sdk
View ubuntu14.04-command-line-install-android-sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
wenzhixin / nginx-puma-redmine-sub-uri
Created May 8, 2015
running nginx, puma & redmine from sub-uri
View nginx-puma-redmine-sub-uri
####### NGINX
nginx config for running redmine under /redmine
(assuming working nginx config)
+++ add
upstream redmine-puma {
server unix:/<<redminepath>>/tmp/sockets/redmine.sock fail_timeout=0;
wenzhixin / install-openldap-gosa-ubuntu14.04
Last active Jan 30, 2020
Install guide for OpenLDAP and GOsa on Ubuntu 14.04
View install-openldap-gosa-ubuntu14.04
sudo apt-get install slapd ldap-utils
sudo dpkg-reconfigure slapd
sudo apt-get install gosa gosa-schema
sudo vi /etc/ldap/convert.conf << EOT
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema
wenzhixin / redmine-3.0.2-on-ubuntu-14.04
Last active Nov 15, 2017
redmine 3.0.2 installer on ubuntu 14.04(new installtion) with nginx, mysql and puma
View redmine-3.0.2-on-ubuntu-14.04
# set cache proxy
sudo vi /etc/apt/apt.conf << EOT
Acquire::http::Proxy "";
Acquire::HTTP::Proxy:: "DIRECT";
sudo apt-get update
sudo apt-get upgrade
View example.js
// a.js
var A = function () {
A.prototype.a = function (a) {
return a;
wenzhixin / validate_share
Created Dec 11, 2014
View validate_share
rsync\ --server*)
TARGET=`echo "$SSH_ORIGINAL_COMMAND" | awk '{ print $NF }'`
if [[ "$TARGET" == $DATA_DIR ]]; then
wenzhixin / jquery.base64.js
Created Oct 29, 2014
Base64 plugin support unicode characters.
View jquery.base64.js
jQuery.base64 = (function($) {
// private property
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
// private method for UTF-8 encoding
function utf8Encode(string) {
string = string.replace(/\r\n/g,"\n");
var utftext = "";
for (var n = 0; n < string.length; n++) {
View ribbon.html
.ribbon {
overflow: hidden;
white-space: nowrap;
position: absolute;
right: 0;
top: 0;
width: 100px;
height: 100px;
You can’t perform that action at this time.