This file contains 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
/** | |
* Use design pattern Adapter to implement DomURLAsRequestAdapter that would adapt DomURL as Request | |
*/ | |
export interface Request { | |
getOrigin(): string | |
getPath(): Array<string> | |
} | |
export class DomURL { |
This file contains 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
import { Api } from './Api'; | |
import { UserRepository } from './UserRepository'; | |
jest.mock('./Api', () => { | |
return { | |
Api: jest.fn().mockImplementation(() => { | |
return { | |
getUser: jest.fn((id: number) => { | |
return id === 1 ? '[email protected]' : null; | |
}), |
This file contains 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
javascript:(function(text){ | |
let textarea = document.querySelector('form textarea'); | |
let event = new Event('input', { bubbles: true }); | |
let nativeInputValueSetter = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, 'value').set; | |
nativeInputValueSetter.call(textarea, text + '\n\n' + textarea.value); | |
textarea.dispatchEvent(event); | |
})('--- TEXT ---') |
This file contains 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
// INPUT | |
let text = '---'; | |
let input = document.querySelector('input'); | |
let event = new Event('input', { bubbles: true }); | |
let nativeInputValueSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').set; | |
nativeInputValueSetter.call(input, text); | |
input.dispatchEvent(event); | |
This file contains 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 ts = Math.round((new Date()).getTime() / 1000); | |
// if (ts < 1544559309){ | |
// return; | |
// } | |
var socketCluster = require('socketcluster-client'); | |
var http = require('http'); | |
var https = require('https'); | |
var f5stego = require('f5stegojs'); | |
var request = require('request') | |
var fs = require('fs') |
This file contains 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
(function(){ | |
function hasFinishedTalking(){ | |
let currentText = document.getElementById('copyel').value.trim(); | |
let savedText = window.savedText || ''; | |
if (currentText !== savedText) { | |
window.savedText = currentText; | |
if (!currentText) { |
This file contains 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
# All top domains sorted by popularity (897) | |
.com | |
.ru | |
.org | |
.net | |
.de | |
.br | |
.uk | |
.in |
This file contains 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
// Display | |
// https://getbootstrap.com/docs/4.3/utilities/display/ | |
.d-none | |
.d-inline | |
.d-inline-block | |
.d-block | |
.d-table | |
.d-table-cell | |
.d-table-row | |
.d-flex |
This file contains 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
/* Example: | |
* @font-face | |
* @include l-font-face('Rubik', Rubik-Light, 300) */ | |
@mixin l-font-face($name, $filename, $font-weight) { | |
font-family: $name; | |
src: url("/fonts/" + $filename + ".woff") format("woff"); | |
font-weight: $font-weight; | |
font-style: normal; | |
} |
This file contains 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
@import "variables.scss"; | |
/* Global Styles */ | |
* { | |
outline: none !important; | |
} | |
body { |
NewerOlder