Skip to content

Instantly share code, notes, and snippets.

View rarous's full-sized avatar
💭
I may be slow to respond.

Aleš Roubíček rarous

💭
I may be slow to respond.
View GitHub Profile
@fnky
fnky / ANSI.md
Last active May 9, 2025 16:07
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@mfikes
mfikes / cljs.md
Last active January 6, 2024 07:13
cljs command

If you wan't a cljs that acts like clj, but for ClojureScript, there are a few minor changes you can make:

First, add the following entry to ~/.clojure/deps.edn under the :deps key:

org.clojure/clojurescript {:mvn/version "1.10.439"}

Then make copies of clj and clojure named cljs and clojurescript, and put those copies on your path.

@dukedorje
dukedorje / cloudflare-worker-rollbar.ts
Created March 13, 2020 05:56
Log errors and messages to Rollbar from a Cloudflare Worker
import ErrorStackParser from 'error-stack-parser'
const ROLLBAR_ACCESS_TOKEN = '[ACCESS TOKEN]'
var rollbarUrl = `https://api.rollbar.com/api/1/item/`
// https://github.com/rollbar/rollbar.js/blob/master/src/errorParser.js
function Frame(stackFrame: ErrorStackParser.StackFrame) {
var data:any = {};
// data._stackFrame = stackFrame;
@gxvxc
gxvxc / blurhashDataURL.ts
Last active April 25, 2025 12:45 — forked from mattiaz9/blurhashDataURL.ts
Convert blurhash to a base64 DataURL string (no canvas or node-canvas)
import { decode } from "blurhash"
const cache: Record<string, string> = {}
export function blurHashToDataURL(hash: string | undefined): string | undefined {
if (!hash) return undefined
const cachedBlurDataURL = cache[hash]
if(cachedBlurDataURL) {