Skip to content

Instantly share code, notes, and snippets.

View jy95's full-sized avatar

Jacques Yakoub jy95

  • Brussels, Belgium
View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active April 26, 2024 03:53
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@a1ip
a1ip / youtube-video-thumbnails-sizes-and-formats.md
Created April 7, 2020 18:53
YouTube video thumbnails sizes and formats

Note: YouTube is serving thumbnails from 2 servers:

  • //img.youtube.com
  • //i.ytimg.com

Examples are with //i.ytimg.com server just because it’s shorter, no other particular reason. You can use both.

  • Player Background Thumbnail (480x360):

@denizssch
denizssch / XpSerials.txt
Created July 21, 2019 00:13
Windows XP ALL Serial Keys :) (For testing purpose [Ex: VM or PenTest])
FCKGW-RHQQ2-YXRKT-8TG6W-2B7Q8
Windows XP PRO Corporate serial number S/N: Key: MQPWW-PGVKX-YPMKG-8DH3G-KC8PW
windows xp home edition serial number S/N: 034634-262024-171505-828316-729010-413531-800424-400442
Windows XP 64 serial number S/N: B2RBK-7KPT9-4JP6X-QQFWM-PJD6G
Windows XP serial number S/N: K6C2K-KY62K-DQR84-RD4QV-QB74Q
Windows XP Professional 64-bit Corporate Edition 5.2.3790.1830 serial number S/N: VCFQD-V9FX9-46WVH-K3CD4-4J3JM
Microsoft Windows XP Professional SP2 serial number S/N: YY8F2-3CKVQ-RKTRG-6JMDR-9DTG6
Windows XP Professional Service Pack 1 sp1 serial number S/N: F46YY - 2R8VQ - R8GMY - 926VK - 6BQ73
Windows XP Pro serial number S/N: KBWR7-76BD8-J7MDQ-KKG&C-V9Q2J
@scryptonite
scryptonite / 0_README.md
Last active October 24, 2019 01:52
Dumps all Sequelize models to JSON to help with creating the first migration script.
  1. Modify & run dump-sequelize-schema.js.
    • It currently uses a few lodash methods, so be sure to temporarily install them—or if you feel up to it you can rewrite the script so they're not needed.
    • npm i lodash.sortby lodash.pick lodash.omit lodash.mapvalues
  2. Inspect sequelize-schema.json and make sure it appears represent all of your tables, attributes, indexes, constraints, references, etc...
  3. When you are satisfied, copy and rename sequelize-schema.json file into a migration-extras/ directory that is next to your migrations/. Name it initial-sequelize-schema.json.
    • migration-extras/
      • -> initial-sequelize-schema.json
    • migrations/
      • (this folder should probably be empty)
  4. Run sequelize migration:create and then copy the contents of 2018XXXXXXXXXX-initial-migration.js into the newly generated migration script. No additional modifications are required if y
@hereismari
hereismari / msi-gtx1060-ubuntu-18.04-deeplearning.md
Last active December 3, 2023 17:14
Setting up a MSI laptop with GPU (gtx1060), Installing Ubuntu 18.04, CUDA, CDNN, Pytorch and TensorFlow
@liaohuqiu
liaohuqiu / gist:4ee77b9b03afcdecc80252252378d367
Created June 9, 2016 00:38
Find out the full duration time of a YouTube playlist
var list = document.getElementsByClassName('pl-video-time');
var time = 0;
function toS(hms) {
var a = hms.split(':');
while (a.length < 3) {
a.unshift(0);
}
var seconds = (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]);
return seconds;
@ktmud
ktmud / gulpfile.js
Last active February 28, 2022 10:39
An example gulpfile.js with bower components and live reload support
var BatchStream = require('batch-stream2')
var gulp = require('gulp')
var coffee = require('gulp-coffee')
var uglify = require('gulp-uglify')
var cssmin = require('gulp-minify-css')
var bower = require('gulp-bower-files')
var stylus = require('gulp-stylus')
var livereload = require('gulp-livereload')
var include = require('gulp-include')
var concat = require('gulp-concat')
@drbobbeaty
drbobbeaty / unpinned_merchants.html
Created September 25, 2012 13:57
Example of creating a CSV download from Google Visualization Table
<html>
<head>
<title>Unpinned Merchants</title>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript' src='zingchart/resources/jquery.min.js'></script>
<script type='text/javascript'>
google.load('visualization', '1', {packages:['table']});
google.setOnLoadCallback(reload_executions);
// set up the fixed locations and paths for this metric visualization.
// we need to be able to pick the server (prod, uat, dev).