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):
const APP = { | |
deferredInstall: null, | |
init() { | |
if ('serviceWorker' in navigator) { | |
//register our service worker | |
navigator.serviceWorker | |
.register('/sw.js', { | |
updateViaCache: 'none', | |
scope: '/', | |
}) |
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):
This is a simple way of importing MySQL database in Docker.
In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.
Put the exported sql file in the shared folder.
Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash
.
Login to MySQL via mysql -u USERNAME -p
.
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' + | |
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' + | |
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' + | |
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));'; | |
try { | |
eval(str); | |
} catch(e) { | |
alert('Your browser does not support ES6!') | |
} |
# Make sure you have already installed apache and mysql; | |
# install rails | |
# https://help.ubuntu.com/lts/serverguide/ruby-on-rails.html | |
sudo apt install rails | |
# install comman dependencies | |
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev make libmysqlclient-dev imagemagick \ | |
libmagickcore-dev libmagickwand-dev |
<?php | |
/** | |
* Convert date/time format between `date()` and `strftime()` | |
* | |
* Timezone conversion is done for Unix. Windows users must exchange %z and %Z. | |
* | |
* Unsupported date formats : S, n, t, L, B, G, u, e, I, P, Z, c, r | |
* Unsupported strftime formats : %U, %W, %C, %g, %r, %R, %T, %X, %c, %D, %F, %x | |
* |
To remove a submodule you need to:
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)