Skip to content

Instantly share code, notes, and snippets.

/*jshint strict:false*/
/*global CasperError console phantom require*/
/**
* grab links and push them into xml
*/
var casper = require("casper").create({
});

Getting beaver talking to logstash w/multiline rollups over TCP & Redis.

Multi-line test

In terminal 1:

beaver -c beaver-tcp.conf

In terminal 2:

@edwardchanjw
edwardchanjw / cheatsheet
Last active March 8, 2024 13:56
Github Markdown(CommonMark) cheat sheet
#Visual Merge, P4Merge
https://forum.unity3d.com/threads/plastic-scm-version-control-for-unity.317888/
#DOMContentLoaded PWA
#Chrome --enable-features=MITMSoftwareInterstitial
--disable-web-security --allow-file-access-from-files --user-data-dir="D:/Chrome"
#Youtube
youtube-dl.exe --write-auto-sub --sub-lang en --sub-format srt --convert-subs srt
##
http://blog.studiominiboss.com/pixelart
@edwardchanjw
edwardchanjw / getFreeOreillyBooks.js
Created September 8, 2017 01:54 — forked from SgtPooki/getFreeOreillyBooks.js
Script to automatically download free ebooks listed on oreilly
/*
Just paste into your console.. or make a tampermonkey/greasemonkey script out of it.
Only tested in Chrome. Be careful.. three tabs are opened per book.
If a books image is not removed, you'll need to try to download that book yourself.
Use this script (enter into the console of your browser) on the following pages:
http://www.oreilly.com/programming/free/
http://www.oreilly.com/business/free/
@edwardchanjw
edwardchanjw / promisesEM.md
Created December 8, 2017 08:17 — forked from dmvaldman/promisesEM.md
Promises as EventEmitters

Promises as EventEmitters

I was trying to understand JavaScript Promises by using various libraries (bluebird, when, Q) and other async approaches.

I read the spec, some blog posts, and looked through some code. I learned how to

@edwardchanjw
edwardchanjw / roles_invesitgation.md
Created December 8, 2017 08:18 — forked from facultymatt/roles_invesitgation.md
Roles and permissions system for Nodejs
@edwardchanjw
edwardchanjw / DefaultComponent.js
Created May 27, 2018 11:50 — forked from loopmode/DefaultComponent.js
Safeguarding async chains in React
// we have an async "initialize" method that performs several calls consecutively.
// after each step in the async chain, we might have been unmounted already
// and performing any further calls becomes obsolete
class DefaultComponent extends React.Component {
// ...
componentDidMount() {
this._isMounted = true;
this.initialize();
}
componentWillUnmount() {
@edwardchanjw
edwardchanjw / blacktape.py
Created August 8, 2020 11:45 — forked from tbnorth/blacktape.py
A PyQt "task launcher" for quick access to python scripts.
"""
A PyQt piece of black tape to cover annoying screen features.
terrynbrown@gmail.com, 2019-10-03
"""
import sys
try:
from PyQt5 import QtWidgets, QtCore, Qt
from PyQt5.QtCore import Qt as QtConst