how to only commit successfully fixed files:
- run checks
parallel clang-tidy --enable-check-profile --store-check-profile=clang-tidy-trace -fix '--checks=-\*,modernize-use-ranges' {} ::: src/*.{cpp,h}
- collect failing build error messages
// ==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:
parallel clang-tidy --enable-check-profile --store-check-profile=clang-tidy-trace -fix '--checks=-\*,modernize-use-ranges' {} ::: src/*.{cpp,h}
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"))?; |
// ==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 |
#!/bin/bash | |
INPUT=${1:-input.mp4} | |
OUTPUT=${2:-output.gif} | |
ffmpeg -i "$INPUT" -vf "fps=10,palettegen=max_colors=20:reserve_transparent=0" palette.png | |
ffmpeg -i "$INPUT" -i palette.png -filter_complex "fps=4,paletteuse" "$OUTPUT" -y | |
rm palette.png |
@main def main() = | |
val blockQuotes = '"'.toString * 3 | |
val text = """@main def main() = | |
val blockQuotes = '"'.toString * 3 | |
val text = %s | |
println(text.formatted(blockQuotes + text + blockQuotes))""" | |
println(text.formatted(blockQuotes + text + blockQuotes)) |
asfd |