Skip to content

Instantly share code, notes, and snippets.

@d0ruk
d0ruk / pipeline.mjs
Created July 20, 2022 18:27
HTTP requests pipeline
import { promisify } from "node:util";
import { pipeline as _p, Transform } from "node:stream";
import request from "got";
import { log, sleep } from "./util.mjs";
const pipeline = promisify(_p);
const transform = new Transform({
transform: function (chunk, enc, cb) {
@d0ruk
d0ruk / keybase.md
Created April 22, 2021 20:08
proof

Keybase proof

I hereby claim:

  • I am d0ruk on github.
  • I am doruk (https://keybase.io/doruk) on keybase.
  • I have a public key ASCuOzH8ohg0nUp5sk7QDS_HZLcEExixYOhGGaGG58GnGAo

To claim this, I am signing this object:

Apply any one of 998 Google fonts on a text.

Randomising CSS variables to change hsl(), font-size, and rotation.

@d0ruk
d0ruk / radio-group.html
Created July 16, 2020 01:32 — forked from robdodson/radio-group.html
A Custom Element radio group which demonstrates roving tabindex
<!--
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
@d0ruk
d0ruk / DOMEventListener.js
Last active March 9, 2020 16:31
JS snippets
// unify because compliance
module.exports = {
on: function(el, eventType, func) {
if (window.addEventListener) {
el.addEventListener(eventType, func, false);
} else {
el.attachEvent("on" + eventType, func);
}
},
@d0ruk
d0ruk / cloudformation.yaml
Created March 21, 2019 19:16 — forked from alexjurkiewicz/cloudformation.yaml
Verdaccio CloudFormation template
# Instructions:
# 1. Check all "TODO" comments and make changes if required for your environment
# 2. Provide values for all required parameters and any optional parameters desired
AWSTemplateFormatVersion: '2010-09-09'
Description: Verdaccio - NPM cache / private registry
Parameters:
# REQUIRED PARAMETERS
Ami:
Type: AWS::EC2::Image::Id
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>react app</title>
<link href="https://fonts.googleapis.com/css?family=Black+Ops+One&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/assets/bootstrap_white.css">
<style>