Skip to content

Instantly share code, notes, and snippets.

View normanzb's full-sized avatar
🛵
stay safe

Norm X normanzb

🛵
stay safe
  • Somewhere decentralised
  • London
View GitHub Profile
@normanzb
normanzb / nomotorbike.txt
Created August 18, 2017 07:05
在中国,不要买摩托
我说过多少次了,不要买摩托!不要买摩托!不要买摩托!在中国禁摩是迟早的事,你们就应该买汽车,越大越好,堵在路上,作为社会的一分子,为这份拥堵做出自己应该做的一份贡献。
我们这个社会的管理者,很多是应试教育出生,看中的是直接眼前的利益,一个问题不到烂得忍不了了,是不会有人去管理的。
你看空气污染问题,早的时候怎么不抓工厂排污?早点怎么不抓尾气排放设立高排放标准?一定都是要等到问题变得火烧鼻毛了,然后一拍脑袋:”既然管不了,就禁了吧?禁谁呢?汽车不能禁,老子自己要开啊,那禁摩托吧。” —— 谁tm规定摩托就不能用电力啊?
好了,现在二氧化碳排放的问题和拥堵问题尚且能忍,不到迫不得已,管理者是不会出面的,所以摩托车二氧化碳排放少,体积小等特点,他们是选择性失明的。
所以我倡议:拥堵和全球变暖什么的,让我们用买汽车加速他们的恶化吧,毕竟只有这样,才能让管理者注意到这些问题,才能把他们拉出来的屎,真真切切喂进他们自己嘴里啊。
root@nva-cqpub1:/var/cache/salt/minion/files/live/java/tasks# salt-call state.sls java/tasks/java8
[ERROR ] Command '['systemd-run', '--scope', 'apt-get', '-q', '-y', '-o', 'DPkg::Options::=--force-confold', '-o', 'DPkg::Options::=--force-confdef', 'install', 'et-java8-installer']' failed with return code: 100
[ERROR ] stdout: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
@normanzb
normanzb / gist:9e1d55f65e86f8abde1368c221755371
Created January 12, 2017 16:38
Hijack the location object
function location(){}
var _location = {};
window.location = new Proxy(_location, {
set: function(target, prop, value, receiver){
debugger;
}
})
var pList = [{"c":[{"d":[{"py":"Dongcheng","t":"Dongcheng","v":"bj_dc"},{"py":"Changping","t":"Changping","v":"bj_cp"},{"py":"Chaoyang","t":"Chaoyang","v":"bj_cy"},{"py":"Chongwen","t":"Chongwen","v":"bj_cw"},{"py":"Daxing","t":"Daxing","v":"bj_dx"},{"py":"Fangshan","t":"Fangshan","v":"bj_fs"},{"py":"Fengtai","t":"Fengtai","v":"bj_ft"},{"py":"Haidian","t":"Haidian","v":"bj_hd"},{"py":"Huairou","t":"Huairou","v":"bj_hr"},{"py":"Mentougou","t":"Mentougou","v":"bj_mtg"},{"py":"miyun","t":"miyun","v":"bj_my"},{"py":"pinggu","t":"pinggu","v":"bj_pg"},{"py":"Shijingshan","t":"Shijingshan","v":"bj_sjs"},{"py":"Shunyi","t":"Shunyi","v":"bj_sy"},{"py":"tongzhou","t":"tongzhou","v":"bj_tz"},{"py":"WangJing","t":"WangJing","v":"bj_wj"},{"py":"Xicheng","t":"Xicheng","v":"bj_xc"},{"py":"Xuanwu","t":"Xuanwu","v":"bj_xw"},{"py":"yanqing","t":"yanqing","v":"bj_yq"}],"py":"Beijing","s":[{"t":"北京 朝阳西坝河爱琴海中心","v":"beijing_aegean"},{"t":"北京 朝阳北苑中心","v":"beijing_beiyuan"},{"t":"北京 朝阳大悦城中心","v":"beijing_joycity"},{"t":"北京 朝阳公园中心",
@normanzb
normanzb / README.md
Last active June 2, 2016 19:52
IE async task strange behavior

Why 'post' shows in between 1 and 2?

Note 1: The following CQ curl commands assumes a admin:admin username and password.
Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command.
Example: -F"":operation=delete""
Note 3: Quotes around name of package (or name of zip file, or jar) should be included.
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
Install a bundle
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
if ((!ta || ta == '_self' || ta == '_top' || (s.wd.name && ta == s.wd.name)) && rs.indexOf('&pe=') >= 0) {
b = e = new Date;
while (!im.s_l && e.getTime() - b.getTime() < 500)
e = new Date
}
et.state.get('').then(function(result){console.log(result)})
javascript:(function()%7Bvar%20iframe%20%3D%20document.getElementsByTagName('iframe')%5B0%5D%3Bif%20(!iframe)%20return%3Biframe.src%3D%22javascript%3Avoid%20(function()%7Bdocument.documentElement.style.overflow%3D'hidden'%3Bdocument.domain%3D'englishtown.com'%3B%7D)()%22%3Bvar%20require%20%3D%20iframe.contentWindow.require%3Bvar%20window%20%3D%20iframe.contentWindow%3Bvar%20name%3Dwindow.prompt('Name%3F')%3Brequire(%5B%22dojo%22%2C%22dijit%2Fdijit%22%5D%2C%20function%20()%20%7Bvar%20ctl%20%3D%20window.dijit.byId(%22dijit_form_Select_1%22)%3Bvar%20opt%20%3D%20ctl.options%5B0%5D%3Bopt.value%20%3D%20name%3Bopt.label%20%3D%20name%3Bctl.setValue(name)%3B%7D)%7D)()
if (CQ_Analytics.Utils.teasersCache && CQ_Analytics.Utils.teasersCache[url]) {
showTeaser(CQ_Analytics.Utils.teasersCache[url]);
} else {
CQ_Analytics.Utils.teasersLoading = CQ_Analytics.Utils.teasersLoading || {};
//teaser might be alreading being loaded
if( CQ_Analytics.Utils.teasersLoading[url]) {
//"come back" in some few ms
window.setTimeout(function() {
CQ_Analytics.Utils.loadTeaserElement(url, elemId);
}, 100);