Skip to content

Instantly share code, notes, and snippets.

Rui Jiang jookyboi

Block or report user

Report or block jookyboi

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
jookyboi / select.ts
Last active Mar 26, 2019
# Markdown - With bullet - Bullet
View select.ts
private selectSnippetInList(snippet: Snippet) {
type: AppEventType.SelectSnippet,
data: { snippet }
jookyboi /
Created Feb 20, 2019
Example gist for Cacher
public class HelloWorld {
public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
jookyboi /
Last active Feb 18, 2019 — forked from rust-play/
Code shared from the Rust Playground
jookyboi /
Last active Mar 22, 2018
The following is a hack to get around the issue posed by It uses Electron to close the BrowserWindow when the popup fails to load. In the latest version of `checkout.js`, Paypal will fall back to

From Electron's main.ts:

import { BrowserWindow, ipcMain } from 'electron';
    () => {
        BrowserWindow.getAllWindows().forEach((win) => {
            // The Paypal window would fail to load contents due to security 
            // restrictions and return an empty URL
View casperjs.cheatsheet.js
// PhantomJS Cheatsheet
$ brew update && brew install phantomjs // install PhantomJS with brew
var page = require('webpage').create();'', function() {});
page.evaluate(function() { return document.title; });
View wp-query-ref.php
* WordPress Query Comprehensive Reference
* Compiled by luetkemj -
* Source:
$args = array(
jookyboi / time_advance.rb
Created Nov 22, 2013
Manipulating Time in Rails
View time_advance.rb => 1, :hours => -1)
jookyboi / random_boolean.rb
Created Nov 19, 2013
Randomly pick boolean value
View random_boolean.rb
[true, false].sample
View scroll_bottom.js
$('#flux').bind('scroll', function()
if($(this).scrollTop() +
>= $(this)[0].scrollHeight)
alert('end reached');
jookyboi / install_notes.txt
Created Oct 29, 2013
Postgres install notes
View install_notes.txt
initdb /usr/local/var/postgres -E utf8 # create a database cluster
postgres -D /usr/local/var/postgres # serve that database
PGDATA=/usr/local/var/postgres postgres # …alternatively
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
you may need to remove the previous version first. See:
To migrate existing data from a previous major version (pre-9.3) of PostgreSQL, see:
You can’t perform that action at this time.