Skip to content

Instantly share code, notes, and snippets.

@SiZapPaaiGwat
SiZapPaaiGwat / 雪球助手.js
Last active December 25, 2017 10:13
雪球助手,方便跳转到理性仁网站查看个股数据。(user.js)
// ==UserScript==
// @name 雪球助手
// @namespace http://tampermonkey.net/
// @version 1.1
// @description 愉快地在雪球、理性仁等网站之间玩耍(跳转)
// @author 小紫baby
// @include /^https:\/\/(xueqiu|www\.lixinger)+\.com.*/
// @grant none
// ==/UserScript==
@SiZapPaaiGwat
SiZapPaaiGwat / SnowBallHelper.js
Created May 17, 2017 06:30
Try to help you make money in the stock market
// ==UserScript==
// @name SnowBallHelper
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to help you make money in the stock market
// @author Simon
// @include /^https:\/\/xueqiu\.com\/\d+#?/
// @grant none
// ==/UserScript==
@SiZapPaaiGwat
SiZapPaaiGwat / mac_xwindows_x11_xvfb_headless_firefox_howto.md
Created March 6, 2017 03:34 — forked from textarcana/mac_xwindows_x11_xvfb_headless_firefox_howto.md
Headless Selenium on CentOS 6.3 (Mac XWindows / X11 / Xvfb / Headless Firefox / Selenium howto)

XWindows for Headless Selenium

X Wing art by Paul Harckham

How to set up a Headless Selenium Testing environment for CentOS 6.3.

On your CentOS 6.3 host

Follow these steps to set up a CentOS 6.3 host to run headless Selenium tests with Firefox.

@SiZapPaaiGwat
SiZapPaaiGwat / gist:c374919e11b2a5ca4944a8f1be97ccc0
Created December 30, 2016 06:18 — forked from outmost/gist:6388914
Read and Write large files using NodeJS
var fs = require('fs');
var readline = require('readline');
var stream = require('stream');
var inputfile = "pathtofile.txt";
var outputfile = "pathtooutputfile.json";
var instream = fs.createReadStream(inputfile);
var outstream = fs.createWriteStream(outputfile, {'flags': 'a'});
outstream.readable = true;
@SiZapPaaiGwat
SiZapPaaiGwat / Git_Installation.sh
Created November 7, 2016 15:20 — forked from firstval/Git_Installation.sh
Installing Git on CentOS 6.7
yum groupinstall "Development Tools"
yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel expat-devel curl-devel
yum install gcc perl-ExtUtils-MakeMaker
yum remove git
wget https://github.com/git/git/archive/v2.5.3.tar.gz -O git.tar.gz
tar -zxf git.tar.gz
cd git-2.5.3
make configure
./configure --prefix=/usr/local
make install
@SiZapPaaiGwat
SiZapPaaiGwat / autoplay.java
Created October 11, 2016 15:49 — forked from aprock/autoplay.java
simple trick to autoplay an html5 video element in a webview. (inject javascript to play on load)
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
private WebView webview;
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@SiZapPaaiGwat
SiZapPaaiGwat / fixed.html
Last active August 4, 2016 09:45
Firefox iframe bug
// html content
<header>header</header>
// this iframe will be displayed
<iframe src="./index.html?anyString#/create"></iframe>
<footer>footer</footer>
@SiZapPaaiGwat
SiZapPaaiGwat / ID.js
Created June 24, 2016 12:25
ID - a unique ID/name generator for JavaScript
// Generate unique IDs for use as pseudo-private/protected names.
// Similar in concept to
// <http://wiki.ecmascript.org/doku.php?id=strawman:names>.
//
// The goals of this function are twofold:
//
// * Provide a way to generate a string guaranteed to be unique when compared
// to other strings generated by this function.
// * Make the string complex enough that it is highly unlikely to be
// accidentally duplicated by hand (this is key if you're using `ID`
/**
* 在线体验地址
* https://repl.it/C5OT/1
*/
import java.util.*;
import java.lang.*;
public class Main {
public static void main(String args[]) {