Skip to content

Instantly share code, notes, and snippets.

View neilwong2012's full-sized avatar
👐
Touching the fish

neil wong neilwong2012

👐
Touching the fish
View GitHub Profile
@neilwong2012
neilwong2012 / file.html
Created February 27, 2020 08:50 — forked from papucho/file.html
Grayscale filter using SVG+CSS
<img src="http://lorempixel.com/400/200/sports/" alt="" class="fader">
body {
background: lightgrey;
font-family: 'Rubik';
line-height: 1.35;
padding: 1rem;
}
.elem {
position: relative;
display: flex;
async initImg (url) {
const img = new Image()
// ios 9 base64 设置会报错,去掉
if (!url.startsWith('data:image')) {
img.setAttribute('crossOrigin', 'Anonymous')
}
img.src = url
await new Promise(resolve => {
img.onload = () => {
@neilwong2012
neilwong2012 / conf.js
Created February 22, 2019 09:37
webpack proxy setcookie
var cookiejar = require('cookiejar')
let cookie
function relayRequestHeaders(proxyReq, req) {
Object.keys(req.headers).forEach((key) => {
proxyReq.setHeader(key, req.headers[key])
})
if (cookie) {
proxyReq.setHeader('cookie', cookie)
}
“只要把微信二维码推送给朋友,就可免费领取华为手环,只需邮费29元!活动仅3天,名额有限!”
天呐!只要付29元的邮费,华为手环就可以免费领,这么好的事,太让人心动了!可万一是假的呢?没事,就29元钱,就算是假的损失也不多,何况万一是真的呢!就是在这样的心里驱使下,这条信息不仅很快在微信朋友圈被疯狂转发,甚至有200多万人次禁不住诱惑,纷纷支付邮费,掉入诈骗的陷阱,8000多万元就这么轻易的进了骗子的口袋。
说起网上购物,这也是最近十几年才兴起的事物,但发展却十分的迅猛,而且网上购物还对1线下购物产生了极大的冲击,许多线下经营者纷纷转型,开始线下和线下结合的进行销售。而对于消费者来说,网上购物能够买到自己想要的东西,价格更加便宜,所以网上购物成为了大家购买商品最重要的方式之一。但是也正式网购的如此火热的时候,不少骗子也看上了这一片天地,开始利用互联网购物进行诈骗。而最近一款29元的手环暗藏的骗局被曝光了,已经有200多万人上当了。
据犯罪嫌疑人顾某交待,之所以以这种方式诈骗是因为他曾经也是受害者。因为金额小,诈骗成功率高,顾某一个月就可以获得几百万的利益。
现在科技产品非常的热销,于是骗子也打起了这个主意,把收伸向了国产手机巨头华为,选择了华为手环作为一个骗取钱财的产品!一个“华为”29元的小小手环,又有着怎样的经济利益是的顾某收获颇丰呢?
@neilwong2012
neilwong2012 / scroll_prevent.js
Created November 7, 2018 09:49
阻止iphone默认橡皮筋效果
//阻止默认的处理方式(阻止下拉滑动的效果)
document.body.addEventListener('touchmove', function (e) {
e.preventDefault();
}, {passive: false});
@neilwong2012
neilwong2012 / epigram.md
Last active March 20, 2019 12:59
epigram

生活的意义并不是与他人争高下,而在于享受努力实现目标的过程,结果是对自己行动的嘉奖

稍后等于永不

You love playing with that.You love playing with all your stuffed animals. You love your mommy,you daddy,your nature pajamas.You love everying,don't you? Yeah You know what,buddy?Once you get older,some of the things that you love might not seem so special anymore.Like your Jack In The Box.Maybe you realize it's just a piece of tin and a stuffed animal and then you forget the few things you really love, And by the time you get to my age maybe it's only one or two things,With me I think it's one.

詹姆斯:你喜欢这个啊,你喜欢玩所有的毛绒玩具,你喜欢妈妈,喜欢爸爸,喜欢你的小睡衣。你什么都喜欢,是不是?知道吗?等你长大了,曾经喜欢的东西也许会变得不再特别,就像这个玩偶盒,你会发现那只是一片铁皮加一个人偶,那些原本钟爱的东西会渐渐被你遗忘,到了我这个年纪,钟爱的东西也许只剩下一两件了,对我来说只剩一件了。

@neilwong2012
neilwong2012 / config.md
Last active September 12, 2018 03:37
mac环境配置
@neilwong2012
neilwong2012 / steam3.js
Last active May 3, 2020 06:30
steam 评分优化脚本 配合 https://tampermonkey.net/ 使用
// ==UserScript==
// @name steam 评分优化脚本
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @include http://store.steampowered.com/search*
// @include https://store.steampowered.com/search*
// @grant none
// ==/UserScript==
@neilwong2012
neilwong2012 / jqueryQueue.js
Created April 25, 2018 03:36
jquery 自定义队列
使用自定义队列实现延时器。
$(e.currentTarget).delay(100, 'queuename').queue('swiper', function() {
do something
}).dequeue('queuename');
$(e.currentTarget).clearQueue('queuename');