Skip to content

Instantly share code, notes, and snippets.

View allenfantasy's full-sized avatar
😸
Feeding my cat

Zeqiu Wu allenfantasy

😸
Feeding my cat
View GitHub Profile
@allenfantasy
allenfantasy / getQueryStringObject.js
Created June 6, 2018 11:30
getQueryStringObject
const getQueryStringObject = url => {
let query = url.split('?')
if (query.length > 1) {
let params = query[1].split('&')
let values = {}
for (let i = 0; i < params.length; i++) {
let param = params[i].split('=')
values[param[0]] = param[1]
}
@allenfantasy
allenfantasy / pf.conf
Created January 30, 2018 14:30
simple shell script to refresh pfctl for MacOS
#
# Default PF configuration file.
#
# This file contains the main ruleset, which gets automatically loaded
# at startup. PF will not be automatically enabled, however. Instead,
# each component which utilizes PF is responsible for enabling and disabling
# PF via -E and -X as documented in pfctl(8). That will ensure that PF
# is disabled only when the last enable reference is released.
#
# Care must be taken to ensure that the main ruleset does not get flushed,
/**
* Like, basically PERFECT scrollbars
*/
/*
It's pure CSS.
Since a quick google search will confirm people going crazy about Mac OS Lion scrollbars...
this has no fade-out effect.
In Mac OS Lion, the lowest common denominator is always showing scrollbars by a setting.