Skip to content

Instantly share code, notes, and snippets.

View dudeofawesome's full-sized avatar

Louis Orleans dudeofawesome

View GitHub Profile

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:

@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.
@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 / 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"
};
echo ""
echo "Installing 𝑓o𝑛𝑡𝑠"
brew tap caskroom/fonts > /dev/null
brew cask install font-fira-code > /dev/null
brew cask install font-roboto > /dev/null
brew cask install font-roboto-mono-for-powerline > /dev/null
echo ""
echo "Installing Fish Shell and setting it as the default shell 🐟"
brew install fish > /dev/null
sudo sh -c 'echo "/usr/local/bin/fish" >> /etc/shells'
chsh -s /usr/local/bin/fish
echo ""
echo "Installing Oh my Fish (and a few plugins) 🐟"
tput bel
cd ~/Downloads
@dudeofawesome
dudeofawesome / cloudSettings
Last active March 31, 2021 14:07
Visual Studio Code Sync Settings GIST
{"lastUpload":"2021-03-31T14:07:08.552Z","extensionVersion":"v3.4.3"}
{
"cmd": ["javac","-cp",".", "$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java",
"variants": [
{ "cmd": ["java","-cp",".","$file_base_name"],
"name": "Run"
},
@dudeofawesome
dudeofawesome / lecture_piecewise_function.js
Last active September 3, 2015 20:46
Math 171 Discrete Mathematics - Piecewise function from lecture
function C (n) {
if (n === 1) {
return n;
} else {
var a = 0;
if (n % 2 === 0) {
a = n / 2;
} else {
a = 3 * n + 1;
}