Skip to content

Instantly share code, notes, and snippets.

View dudeofawesome's full-sized avatar

Louis Orleans dudeofawesome

View GitHub Profile
@dudeofawesome
dudeofawesome / env2json.js
Created March 9, 2017 05:46
Packages env vars into a Postman environment JSON file
#!/usr/bin/env node
const env = {
name: "globals",
values: [],
timestamp: Date.now(),
_postman_variable_scope: "global",
_postman_exported_at: (new Date()).toISOString(),
_postman_exported_using: "Postman/4.10.3"
};
@dudeofawesome
dudeofawesome / export-colors.fish
Last active July 6, 2022 10:22
Easily export Fish Shell colors
#!/usr/bin/env fish
function rainbowify -d "Rainbow-ify text"
set -l RAINBOW red FF8800 yellow green blue purple
set LENGTH (string length $argv)
set SPLIT (string split '' $argv)
for i in (seq $LENGTH)
set PERC (math -s2 $i / $LENGTH)
@dudeofawesome
dudeofawesome / char_comparison_benchmark.dart
Created January 27, 2018 07:29
Benchmark char comparison methods in Dart
import 'package:benchmark_harness/benchmark_harness.dart';
const testString = 'this is a test string that you can ignore.';
class BareRunesForLoopBenchmark extends BenchmarkBase {
const BareRunesForLoopBenchmark() : super('s.runes');
static void main() => new BareRunesForLoopBenchmark().report();
// The benchmark code.

Keybase proof

I hereby claim:

  • I am dudeofawesome on github.
  • I am dudeofawesome (https://keybase.io/dudeofawesome) on keybase.
  • I have a public key ASDbAWmEpBQyEr7VP8tdm7zApwmi7h25hqZxWwLP8jSflAo

To claim this, I am signing this object:

delay 1
set classNames to {}
tell application "System Events"
tell front window of (first application process whose frontmost is true)
repeat with uiElem in entire contents as list
set classNames to classNames & (class of uiElem as string)
end repeat
end tell
end tell
@dudeofawesome
dudeofawesome / DevTools.ts
Last active August 25, 2024 00:24
Repro Effect AWS AccessDeniedException
import { DevTools } from '@effect/experimental';
import { NodeSocket } from '@effect/platform-node';
import { Effect, Layer, Logger } from 'effect';
export const DevToolsLive = Layer.effectDiscard(Effect.sleep(100)).pipe(
Layer.provideMerge(DevTools.layerSocket),
Layer.provide(NodeSocket.layerNet({ port: 34437 })),
Layer.merge(Logger.pretty),
);