A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.
.subtext {
display: inline-block;
background: linear-gradient(to left, transparent 50%, #f60 50%) right;
const one = +true; //This would return 1 (Unary and boolean operator) | |
const zero = +false; // This would return 0 (Unary and boolean operator) | |
//Using string operations apending 1 and 0 and 0 to form "100" | |
const hundredInString = one.toString() + zero.toString() + zero.toString(); | |
// To save the day for not using the loop, we are using recursion function. | |
const printInRecursion = (index) => { | |
if (index <= parseInt(hundredInString)) { | |
console.log(index); | |
printInRecursion(index + one); |
A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.
.subtext {
display: inline-block;
background: linear-gradient(to left, transparent 50%, #f60 50%) right;
// by @noseratio | |
// https://twitter.com/noseratio/status/1297517388552757249?s=20 | |
// gist: https://gist.github.com/noseratio/721fea7443b74a929ea93c8f6a18cec4/edit | |
// RunKit: https://runkit.com/noseratio/async-generators-and-for-await-in-javascript | |
async function delay(ms) { | |
await new Promise(r => setTimeout(r, ms)); | |
return ms; | |
} |
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script> | |
<!-- | |
Hello Camper! | |
For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! | |
- The freeCodeCamp Team |
this was tested using windows10 pro | |
when cloning a git this error was produced | |
fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/RepositoryName': The requested URL returned error: 403 | |
to fix add the following git configuration | |
git config --global credential.helper "!aws codecommit credential-helper $@" | |
git config --global credential.UseHttpPath true | |
check if git has system credential.helper by typing |
import { Injectable } from '@angular/core'; | |
import { Observable, BehaviorSubject } from 'rxjs/Rx'; | |
@Injectable() | |
export class AudioService { | |
public audio: HTMLAudioElement; | |
public timeElapsed: BehaviorSubject<string> = new BehaviorSubject('00:00'); | |
public timeRemaining: BehaviorSubject<string> = new BehaviorSubject('-00:00'); | |
public percentElapsed: BehaviorSubject<number> = new BehaviorSubject(0); |
import { Directive, Input, TemplateRef, ViewContainerRef, EmbeddedViewRef, ChangeDetectorRef } from '@angular/core'; | |
import { Observable } from 'rxjs/Observable'; | |
import { Subscription } from 'rxjs/Subscription'; | |
@Directive({ | |
selector: '[streamContext][streamContextOn]' | |
}) | |
export class StreamContext { | |
@Input() streamContextOn: Observable<any>; | |
templateRef: TemplateRef<any>; |
db = db.getSiblingDB("admin"); | |
dbs = db.runCommand({ "listDatabases": 1 }).databases; | |
storageSize = 0; | |
totalSize = 0; | |
dbs.forEach(function(database) { | |
db = db.getSiblingDB(database.name); | |
stats = db.stats(); | |