- Download Win 10 installation ISO and create a bootable USB drive.
- Download Wifi drivers from Dell and put them on the USB drive.
- Boot, F12 for system menu, select BIOS Setup.
- System Configuration -> SATA Operation and change from "RAID On" to "AHCI".
- Secure Boot -> Secure Boot Enable and change to "Disabled"
- Reboot, F12 for system menu, select the external USB drive and install Win 10.
This file contains hidden or 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
<?php | |
/** | |
* Pluck an array of values from an array. (Only for PHP 5.3+) | |
* | |
* @param $array - data | |
* @param $key - value you want to pluck from array | |
* | |
* @return plucked array only with key data | |
*/ | |
function array_pluck($array, $key) { |
This file contains hidden or 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
swPrecache.write(path.resolve(__dirname, `../public/service-worker.js`), { | |
cacheId: `know-it-all`, | |
filename: `service-worker.js`, | |
stripPrefix: `public/`, | |
staticFileGlobs: [ | |
`public/app.*.js`, // don't include the polyfills version | |
`public/*.{html,ico,json,png}`, | |
], | |
dontCacheBustUrlsMatching: [ | |
/\.(js|json)$/, // I'm cache busting js and json files myself |
This file contains hidden or 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
{ | |
init: function(elevators, floors) { | |
elevators.forEach(function(e) { | |
e.isDestination = function(floorNum) { | |
return e.destinationQueue.indexOf(floorNum) != -1; | |
} | |
e.on("floor_button_pressed", function(floorNum) { | |
if (!e.isDestination(floorNum)) | |
e.goToFloor(floorNum); |
This file contains hidden or 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
/* | |
why fixDate? | |
if we create a JS Date writing: | |
var d = new Date("2015-05-15") | |
we are not specifying any timezone | |
the browser/environment will asume it is UTC+000, | |
and always represent it in user's LOCAL TIMEZONE! | |
so, running in an environment located in a UTC-3 zone, | |
d would actually show 2015-05-14 at 21:00 | |
and may lead to errors. |
This file contains hidden or 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
//Before </body> tag | |
<script> | |
var xhr = new XMLHttpRequest(); | |
xhr.open("get", "cookbook.js", true); | |
xhr.onreadystatechange = function () { | |
if (xhr.readyState == 4) { | |
if (xhr.status >= 200 && xhr.status < 300 || xhr.status == 304) { | |
var script = document.createElement("script"); | |
script.type = "text/javascript"; | |
script.text = xhr.responseText; |
This file contains hidden or 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
// abstract class, not intended to be instantiated directly | |
class CalendarItem { | |
static #UNSET = Symbol("unset") | |
static #isUnset(v) { | |
return v === this.#UNSET; | |
} | |
static { | |
for (let [idx,msg] of [ | |
"ID is already set.", | |
"ID is unset.", |
Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.
If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.
This file contains hidden or 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
/* `useLocalStorage` | |
* | |
* Features: | |
* - JSON Serializing | |
* - Also value will be updated everywhere, when value updated (via `storage` event) | |
*/ | |
import { useEffect, useState } from "react"; | |
export default function useLocalStorage<T>(key: string, defaultValue: T): [T, (value: T) => void] { |
OlderNewer