I hereby claim:
- I am r37r0m0d3l on github.
- I am r37r0m0d3l (https://keybase.io/r37r0m0d3l) on keybase.
- I have a public key ASCXNlJUnJroBOrwAqnUFgfzNVRmIt1W2Bce89aW
| data: | |
| image: debian:jessie | |
| user: www-data | |
| volumes: | |
| - ./src:/var/www/ | |
| web: | |
| image: php:5.6-apache | |
| links: | |
| - db |
| function verboseRegExp(input) { | |
| if (input.raw.length !== 1) { | |
| throw Error('verboseRegExp: interpolation is not supported'); | |
| } | |
| let source = input.raw[0]; | |
| let regexp = /(?<!\\)\s|[/][/].*|[/][*][\s\S]*[*][/]/g; | |
| let result = source.replace(regexp, ''); |
| function logClass(target: any) { | |
| // save a reference to the original constructor | |
| var original = target; | |
| // a utility function to generate instances of a class | |
| function construct(constructor, args) { | |
| var c : any = function () { | |
| return constructor.apply(this, args); | |
| } |
| # git clone https://github.com/NVlabs/stylegan2 | |
| import os | |
| import numpy as np | |
| from scipy.interpolate import interp1d | |
| from scipy.io import wavfile | |
| import matplotlib.pyplot as plt | |
| import PIL.Image | |
| import moviepy.editor | |
| import dnnlib |
| const factorial = (n) => { | |
| const next = n <= 1 ? () => n * 1 : () => n * factorial(n - 1); | |
| return next(); | |
| }; |
| class Parent { | |
| constructor() { | |
| if (new.target === Parent) { | |
| console.log("This is parent class"); | |
| } | |
| else { | |
| console.log("This is extended child class"); | |
| } | |
| } | |
| } |
| import { Injectable, MiddlewareFunction, NestMiddleware } from '@nestjs/common'; | |
| import * as morgan from 'morgan'; | |
| import { LoggerService } from './mylogger'; | |
| @Injectable() | |
| export class MorganMiddleware implements NestMiddleware { | |
| constructor(private readonly logger: LoggerService) {} | |
| resolve(): MiddlewareFunction { | |
| return morgan('combined', { | |
| stream: { write: str => this.logger.info(str) }, |
| // ESC[#A moves cursor up # lines | |
| // ESC[#B moves cursor down # lines | |
| // ESC[#C moves cursor right # spaces | |
| // ESC[#D moves cursor left # spaces | |
| // Script can be written as is | |
| process.stdout.write("\u001b[2J\u001b[0;0H"); | |
| process.stdout.write("\u001b[0;30m"); | |
| process.stdout.write("Hello there\n"); |
I hereby claim:
| /* | |
| Copy this into the console of any web page that is interactive and doesn't | |
| do hard reloads. You will hear your DOM changes as different pitches of | |
| audio. | |
| I have found this interesting for debugging, but also fun to hear web pages | |
| render like UIs do in movies. | |
| */ | |
| const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |