Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
content+='<a href= '#' class='pdf_viewer' data-url='+val2.displayUrl+ '>' + val2.displayUrl +'</a>' | |
Include this line in JS | |
$('a.pdf_viewer').live('click', function(e){ | |
e.preventDefault(); | |
url = $(e.target).data('url'); | |
window.location = url; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested on Ubuntu 16.04 and X11, 2019 | |
# 1. Download NVIDIA driver as a .run file | |
# 2. Stop X-Server | |
sudo service lightdm stop | |
# 3. Blacklist Nouveau driver | |
sudo nano /etc/modprobe.d/blacklist-nouveau.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 - Autos & Vehicles | |
1 - Film & Animation | |
10 - Music | |
15 - Pets & Animals | |
17 - Sports | |
18 - Short Movies | |
19 - Travel & Events | |
20 - Gaming | |
21 - Videoblogging | |
22 - People & Blogs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
DO NOT USE THIS POLYFILL | |
because `instanceof` operator won't work | |
copy from | |
https://github.com/paulmillr/es6-shim | |
https://github.com/wesleytodd/setprototypeof | |
https://github.com/zloirock/core-js | |
*/ | |
Object.setPrototypeOf = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Class { | |
w(config) { | |
config = arguments[1]; config.url = arguments[0]; console.log(arguments[1],arguments[0]); | |
} | |
} | |
new Class().w('xxx', {}) | |
function fn(config) { config = arguments[1]; config.url = arguments[0]; console.log(arguments[1],arguments[0]); } | |
fn('xxx', {}) |
OS X 10.11, aka El Capitan, comes with a new system font for Chinese users, named PingFang, it includes 6 weights for both Simplified and Traditional Chinese. The same font also appear on iOS 9 as the default UI font, though Apple didn't mention it explicitly.
If you are in Apple Developer Program (costs 99 USD a year), then you can get them now at their developer resource site, otherwise you can wait for their public beta to come out in July or wait for the public release this fall (a free upgrade like previous release).
Or you can get PingFang.ttc
from your developer friends, though you are probably violating its font license one way or another, but I am not a lawyer so freedom to you.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStore } from 'vuex' | |
+++import VuexPersistence from 'vuex-persist' | |
+++import { ChromeSyncStorage } from '@/store/chrome-storage' | |
+++const storage = new VuexPersistence({ | |
+++ asyncStorage: true, | |
+++ storage: ChromeSyncStorage | |
+++}) | |
// Create a new store instance. |
NewerOlder