Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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) {
<!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>

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

Apply any one of 998 Google fonts on a text.