Skip to content

Instantly share code, notes, and snippets.

View scarf005's full-sized avatar

scarf scarf005

View GitHub Profile
#!/bin/bash
# TO USE
# 1. clone github.com/dustinkirkland/hollywood
# 2. cd to hollywood
# 3. install errno/speedometer/cmatrix/apg/hexdump...etc
# 4. download this script into root of hollywood (so hollywood/peace-comes-at-a-price.bash)
# 5. chmod+x peace-comes-at-a-price.bash then launch it
HOLLY=${HOLLY:-$PWD}
1.6.2+46-131b3958-SNAPSHOT
@scarf005
scarf005 / aistudio-search-on.user.js
Last active September 26, 2025 07:03
force enables URL context in aistudio.google.com because some forsaken reason it's not enabled by default
// ==UserScript==
// @name aistudio search and URL context always ON
// @namespace https://github.com/scarf005
// @version 1.2
// @description force enables web search in aistudio.google.com because some forsaken reason it's not enabled by default
// @author scarf005
// @match https://aistudio.google.com/*
// @homepageURL https://gist.github.com/scarf005/fddcef68aefaba19bb512cc8a9258cf8
// @supportURL https://gist.github.com/scarf005/fddcef68aefaba19bb512cc8a9258cf8
// @downloadURL https://gist.github.com/scarf005/fddcef68aefaba19bb512cc8a9258cf8/raw/aistudio-urlcontext-on.user.js
// ==UserScript==
// @name 파파존스 무조건 소스많이
// @namespace https://github.com/scarf005
// @description 무조건 소스많이!!!!!!
// @author scarf
// @version 1.2.0
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
//
// @homepageURL https://gist.github.com/scarf005/fa439569d0d146fb4c25b9a388429d1e
// @supportURL https://gist.github.com/scarf005/fa439569d0d146fb4c25b9a388429d1e
@scarf005
scarf005 / autofill-BN-template.user.js
Last active April 28, 2025 15:26
because how will you do drive-by BN contribution otherwise?
// ==UserScript==
// @name autofill BN PR template
// @namespace https://github.com/scarf005
// @description drive-by BN contribution
// @author scarf
// @version 1.0.0
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
//
// @homepageURL https://gist.github.com/scarf005/a290a4aa96eaa7c66ba6282f68bdd7e8
// @supportURL https://gist.github.com/scarf005/a290a4aa96eaa7c66ba6282f68bdd7e8

how to only commit successfully fixed files:

  1. run checks
parallel clang-tidy --enable-check-profile --store-check-profile=clang-tidy-trace -fix '--checks=-\*,modernize-use-ranges' {} ::: src/*.{cpp,h}
  1. collect failing build error messages
@scarf005
scarf005 / lib.rs
Created April 19, 2025 12:09
order preserving javascript JSON serde via giving and passing Map
use serde_json::Value;
use serde_wasm_bindgen;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn parse_json(string: JsValue) -> Result<JsValue, JsValue> {
let string: String = string
.as_string()
.ok_or_else(|| JsValue::from_str("Expected a string"))?;
@scarf005
scarf005 / bap.user.js
Created April 6, 2025 03:17
Replace thumbs-down with baps
// ==UserScript==
// @name GitHub Custom Thumbs Down
// @namespace https://github.com/scarf005
// @version 1.0.0
// @description Replaces the default GitHub thumbs down emoji with a custom image
// @author scarf
// @match https://github.com/*
// @grant none
// @run-at document-idle
// ==/UserScript==
import scala.annotation.tailrec
sealed abstract class SnocList[+A]:
inline def :<[B >: A](a: B): SnocList[B] = new :<(this, a)
final def toList: List[A] =
@tailrec def go(xs: SnocList[A], acc: List[A]): List[A] = xs match
case Lin => acc
case xs :< x => go(xs, x :: acc)
go(this, Nil)
override def toString: String = toList.mkString("SnocList(", ", ", ")")
// https://xebia.com/blog/how-to-derive-type-class-instances-with-shapeless-3/
//> using dep org.typelevel::shapeless3-deriving::3.5.0
package deriving
import shapeless3.deriving.*
trait Show[A]:
def show(a: A): String