Skip to content

Instantly share code, notes, and snippets.

Apply any one of 998 Google fonts on a text.

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

<!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/rc-tooltip@3.7.3/assets/bootstrap_white.css">
<style>
@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 / article.md
Last active August 10, 2021 10:40
Sync your GitHub repo with https://codesandbox.io/

CodeSandbox(CSB) is an online React playground. One of the ways to add a project there is through importing from GitHub. Please sign in via GitHub.

This article will walk through the steps of sync'ing a create-react-app (CRA) project on a GitHub repo with a sandbox.

First, a quick recap of how to use CRA;

>> npm i -g create-react-app

>> create-react-app cra-app

@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:

@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 / aws-host-static.js
Last active March 9, 2020 16:34
AWS host static folder
const fs = require("fs");
const path = require("path");
const Promise = require("bluebird");
const readdir = require("recursive-readdir");
const { bgRed, bgGreen, bgBlue, bold, white } = require("chalk");
const PKG = require("./package.json");
const AWS = require("aws-sdk");
const s3 = new AWS.S3();
const bucketName = `${PKG.name}-v${PKG.version}`;