- While your computer is booting, press
F8
key (in case boot menu doesn't appear) - From the boot menu select the
"recovery mode"
option and boot into recovery mode. - Select the option
'Drop to root shell prompt'
- Type the following command to change the password:
passwd username
- Example:
passwd bigfatsoftware
- Example:
passwd tangoabcdelta
I have a git repo which compiles into a dist folder and generates a bunch binaries (executables).
The binaries and dist
folders are .gitignore
-ed and hence, are not included in the repo.
But I want to distribute a source
+ binaries
snapshot zipfile.
I want them to contain:
a) all the sources
b) all the binaries
c) the dist folder (so that they can tweak it)
d) not the .git/
directory, not the hidden files like .cache
or node_modules/
etc.
- Check for existing SSH keys
- Generate a new SSH key to use for authentication
- Add it to the
ssh-agent
.
- If you don't already have an SSH key, you must generate a new SSH key. If you're unsure whether you already have an SSH key, check for existing keys.
- If you don't want to reenter your passphrase every time you use your SSH key, you can add your key to the SSH agent, which manages your SSH keys and remembers your passphrase.
console.log(
(x = {
a: 10,
b: () => this.a,
c: function() {
return this.a;
},
}) && x.b(),
x.c(),
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
/* Detect-zoom | |
* ----------- | |
*https://codepen.io/reinis/pen/RooGOE | |
* Cross Browser Zoom and Pixel Ratio Detector | |
* Version 1.0.4 | Apr 1 2013 | |
* dual-licensed under the WTFPL and MIT license | |
* Maintained by https://github/tombigel | |
* Original developer https://github.com/yonran | |
*/ |
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
window.performance.getEntriesByType("resource").filter(p => 'nextHopProtocol' in p)[0].nextHopProtocol // 'h2' | |
// deprecated | |
// https://chromestatus.com/feature/5637885046816768 | |
window.chrome.loadTimes().wasFetchedViaSpdy; // true | |
window.chrome.loadTimes().npnNegotiatedProtocol; // 'h2' | |
window.chrome.loadTimes().connectionInfo; // 'h2' | |
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
# create a self signed certificate for localhost | |
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048 | |
openssl rsa -passin pass:x -in server.pass.key -out server.key | |
# writing RSA key | |
rm server.pass.key | |
openssl req -new -key server.key -out server.csr | |
# Country Name (2 letter code) [AU]:IN | |
# State or Province Name (full name) [Some-State]:Karnataka |
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
// The native unescape or decodeURI or decodeURIComponent is not suitable for this job | |
// Instead, take the escaped HTML entity and set it as innerHTML | |
// Then, extract the innerText | |
// The complete list of HTML entities with their numbers and names can be found here. | |
// This page also includes full list of ASCII characters that can be represented in HTML. | |
// https://www.freeformatter.com/html-entities.html | |
d = document.createElement('div'); d.innerHTML = '!'; d.innerText; |
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
var input = [11, 12, 13, 55, 34, 66, 88, 12, 98, 67, 12, 66, 53, 23]; | |
console.log(`input size is ${input.length}`); | |
(function theSindresorhusApproach() { | |
// the sindresorhus approach | |
function* play() { | |
let h = {}; | |
input.map((i) => (h[i] = i)); |
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
var _createClass = (function () { | |
function defineProperties(target, props) { | |
for (var i = 0; i < props.length; i++) { | |
var descriptor = props[i]; | |
descriptor.enumerable = descriptor.enumerable || false; | |
descriptor.configurable = true; | |
if ("value" in descriptor) { | |
descriptor.writable = true; | |
} | |
Object.defineProperty(target, descriptor.key, descriptor); |