Skip to content

Instantly share code, notes, and snippets.

@pantor
pantor / nvidia-driver-realtime.sh
Last active May 1, 2024 21:06
Installing NVIDIA drivers on a realtime Linux (PREEMPT-RT)
# 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
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 1, 2024 21:05
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@dgp
dgp / youtube api video category id list
Created June 11, 2015 05:57
youtube api video category id list
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
@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created July 19, 2019 17:54
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
/*
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 =
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', {})
@dgeibi
dgeibi / note-on-osx-pingfang.md
Last active May 1, 2024 21:03 — forked from bitinn/note-on-osx-pingfang.md
A few notes on using OS X 10.11 (El Capitan)'s new Chinese font: PingFang (苹方/萍方).

What's this about?

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.

How to get it?

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.

@ArtemZip
ArtemZip / store.js.diff
Last active May 1, 2024 21:02
vuex-chrome-storage/chrome-storage
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.
@Christmom3
Christmom3 / Chrome-thief
Created December 25, 2022 13:45
Chrome-thief@chrome-thief.com
https://u19307177.ct.sendgrid.net/ls/click?upn=Yd-2B7DEQTwrhOH-2FMDcY51qqzukAJ0NB4OzL0ySBC0gACKy3-2BVK2yIt0GYj6UEFinmfxNHtwnhMy-2F2hOGTn7BM2pZROAEgcgNTIemBYNiJ56P-2FxItC-2B5QDABFjC4tNzB3p6fvixyGtJZexhFSKEmX8J9E-2BvumprPkcPRggoZZahpwdekRhsOI3ELs2ajPeKWPl0hyr-2BOGFoOA-2F1KPkI49GTV-2BJ7uJp3HZag6hp5aSq20LPmiG9N4KgMBT-2B6qc4yOe7RdbhCciyadKwz0Dq5ms-2Bn5C-2FywKf08CoNaXjPcTji9vJ9rvheWHpMWjxiQ3i1QExNQOGHYCuEWYRlSQWQmOxxowVr0aShY0dAD-2BBePg8c44yeGUwpJds0LBVvK5apdQ8muwCGMxu1PK5IeDIm3SKMILmFvDBnhyvfD-2FHxiTUYHDKbJcb3jL0Wxptf1IbT8Oftrs3aUjAnEnjPwro0P8jYw-3D-3DVeS3_TfWycX5MQoSP8Dvbyfpcyu5KnNp-2B2GpW1CqOMPp1B0N7gJBOdb8JnFg71lHWerS-2BWj720GTK9rXTzamUBUMcmGLeP0rEAflkNOZweCSKum3V8ALufwbdfrTAS7fwo27cBBENsAYZjsbbJCGHeZ2Er3tRCR7-2BIJrKcmaSn0WO6abXZ-2BekT-2Bcb9HgXfUIyl3bnUXEgdZ25-2F-2FvZM2myoaznd1QuuXTuwvvVblYyp7oQOcA-3D