Skip to content

Instantly share code, notes, and snippets.

View haltcase's full-sized avatar
🌌
in the cosmos

Bo Lingen haltcase

🌌
in the cosmos
View GitHub Profile
/* ==UserStyle==
@name feedly haltcased
@namespace haltcase
@version 1.0.1
@author Bo Lingen <bo@haltcase.dev> (https://bolingen.me)
@license unlicense
@preprocessor default
==/UserStyle== */
@-moz-document url-prefix("https://feedly.com/i") {
@haltcase
haltcase / mac-file-cleanup-dryrun.ps1
Last active May 16, 2023 15:10
Find & delete leftover "dot underscore" files from macOS, using PowerShell on Windows.
# log the -WhatIf output to a file for review
start-transcript c:\mac-file-cleanup.txt
get-childitem -directory |
get-childitem -filter ._* -file -force -recurse |
# filter out the items that don't have an accompanying non-dot-underscore file
where-object { test-path -literalPath (join-path $_.directoryName ($_.name -replace '^\._','')) } |
foreach-object { remove-item -literalPath $_.fullName -force -WhatIf }
stop-transcript
@haltcase
haltcase / index.html
Last active July 29, 2018 19:22
karax re-render attempt
<!DOCTYPE html>
<html>
<head>
<title>Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body id="body">
<div id="ROOT" />
<script type="text/javascript" src="nimcache/t.js"></script>
@haltcase
haltcase / t.nim
Created June 1, 2018 17:01
glob perf test
import os, ospaths, future, times
import src/glob
proc touchFile (path: string) =
let (head, _) = path.splitPath
head.createDir
var f = open(path, fmWrite)
f.write("")
f.close
// https://travis-ci.org/citycide/trilogy/jobs/262847143
// https://github.com/citycide/trilogy/blob/92bfe9e2c0767ab1f489b2cb66446d979e0c6726/tests/getter-setter.js
// results in: SyntaxError { 'Unexpected token (' }
test.before(async () => {
await db.model('people', {
name: {
type: String,
// renaming this to `get` prevents the error
@haltcase
haltcase / results.md
Created May 28, 2017 03:13
Testing performance differences for various Lodash import strategies.
generating test cases ...

creating test case: require-object-pattern-all
creating test case: require-object-pattern-sample-15
creating test case: require-cherry-picked-all
creating test case: require-cherry-picked-sample-15
creating test case: import-namespaced-all
creating test case: import-namespaced-sample-15
creating test case: import-cherry-picked-all
@haltcase
haltcase / badge.md
Last active November 25, 2017 21:33
LightScript badge

img

@haltcase
haltcase / range.md
Created March 15, 2017 03:11
Code golfing the crap out of a JavaScript `range()` function.

A function that does this:

range(10)       // -> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
range(0, 10)    // -> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
range(0, 10, 2) // -> [0, 2, 4, 6, 8]

Let's do it in < 100 bytes!