Skip to content

Instantly share code, notes, and snippets.

View zxkane's full-sized avatar

Mengxin Zhu zxkane

View GitHub Profile
@zxkane
zxkane / Dockerfile
Last active October 8, 2017 18:31 — forked from dceejay/Dockerfile
Run latest node-red on Ubuntu 14.04
# Dockerfile for Node-RED - pulls latest master code from git
FROM ubuntu:14.04
# based on the original by @cpswan
MAINTAINER ceejay kane
# add universe repository to /etc/apt/sources.list
# we need it later as rlwrap is required by node.js
#RUN sed -i s/main/'main universe'/ /etc/apt/sources.list
@zxkane
zxkane / .gitignore
Last active August 29, 2015 14:20
Simple pmr server
*.pyc
@zxkane
zxkane / output
Last active August 29, 2015 14:24
gradle exec issue
➜ wechat git:(master) ✗ ./gradlew -b test.gradle npm -S
:npm FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':npm'.
> A problem occurred starting process 'command 'npm''
* Try:
@zxkane
zxkane / default
Last active August 29, 2015 14:25 — forked from pdeschen/initd
# defaults for VME wechat server
# pulled in from the init script; makes things easier.
NAME=vme-wechat
# location of java
JAVA=/home/jenkins/jenkins-home/tools/hudson.model.JDK/java-1.8/bin/java
# arguments to pass to java
JAVA_ARGS="-Dspring.profiles.active=svt" # specify active profile for spring boot
@zxkane
zxkane / vme-jenkins-docker.sh
Created July 22, 2015 10:44
launch jenkins docker container
docker stop vme-jenkins
docker rm vme-jenkins
export HOST_IP=`/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
docker run --name vme-jenkins -p $HOST_IP:8080:8080 -p 50000:50000 -e "JAVA_OPTS=-Duser.timezone=Asia/Hong_Kong" -v /home/zxkane/jenkins:/var/jenkins_home -d jenkins
@zxkane
zxkane / captcha.php
Last active March 11, 2016 09:23
check coverage
<?php
function base64_to_jpeg($base64_string, $output_file) {
$ifp = fopen($output_file, "wb");
fwrite($ifp, base64_decode($base64_string));
fclose($ifp);
return $output_file;
}
@zxkane
zxkane / requirements.txt
Last active January 20, 2017 02:34
get the cookie of getsupport.apple.com
selenium==3.0.2
@zxkane
zxkane / .gitignore
Last active April 11, 2017 07:21
deploy ss with mgr in swarm
db/
nginx/
@zxkane
zxkane / support-output.txt
Created September 20, 2017 08:54
output of running support.sh of docker
iptables configuration
Chain INPUT (policy ACCEPT 4863K packets, 5615M bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
4820K 7743M DOCKER-USER all -- * * 0.0.0.0/0 0.0.0.0/0
4820K 7743M DOCKER-INGRESS all -- * * 0.0.0.0/0 0.0.0.0/0
4812K 7742M DOCKER-ISOLATION all -- * * 0.0.0.0/0 0.0.0.0/0
169 57205 ACCEPT all -- * docker0 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
@zxkane
zxkane / tiancaiyisheng.py
Created November 19, 2017 07:17
download from 5tps
# -*- coding: utf-8 -*-
# encoding: utf-8
'''
@author: kane
'''
import argparse
import os, errno
import requests
def download(url, localFileName, headers):