Skip to content

Instantly share code, notes, and snippets.

View 333fred's full-sized avatar
💭
I may be slow to respond.

Fred Silberberg 333fred

💭
I may be slow to respond.
View GitHub Profile
@333fred
333fred / Omnisharp crashlog
Last active October 19, 2020 22:05
Omnisharp Crash Log
Starting OmniSharp server at 10/19/2020, 2:30:06 PM
Target: /home/fred/git/roslyn/Compilers.sln
OmniSharp server started.
Path: /home/fred/.vscode/extensions/ms-dotnettools.csharp-1.23.4/.omnisharp/1.37.3/run
PID: 114707
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on arch 0.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
@333fred
333fred / Benchmark Results
Last active May 7, 2020 04:43
Small ImmutableArray vs Hashset
| Method | DesiredContainer | NumFetches | Mean | Error | StdDev |
|-------- |----------------- |----------- |---------------:|--------------:|--------------:|
| HashSet | 1 | 1 | 26.149 ns | 0.4213 ns | 0.3941 ns |
| Array | 1 | 1 | 3.068 ns | 0.0386 ns | 0.0361 ns |
| HashSet | 1 | 100 | 2,374.146 ns | 4.8138 ns | 4.5028 ns |
| Array | 1 | 100 | 275.267 ns | 1.3763 ns | 1.2201 ns |
| HashSet | 1 | 10000 | 243,664.632 ns | 341.7355 ns | 319.6596 ns |
| Array | 1 | 10000 | 27,245.051 ns | 143.4551 ns | 134.1880 ns |
| HashSet | 2 | 1 | 25.953 ns | 0.0330 ns | 0.0275 ns |
| Array | 2 | 1 | 7.641 ns | 0.0147 ns | 0.0123 ns |
@333fred
333fred / profile.json
Last active August 3, 2020 23:57
Initial profile for the new windows terminal
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"profiles":
@333fred
333fred / .zgit
Created July 7, 2017 22:52
Git For Windows on WSL With GPG2 Signing
# ZSH Function to determine what version of git to run, based on a list of known windows locations. Source from .zshrc
win_locs=('/mnt/c' ...) # Others go here
select_git() {
local cur_dir=$(pwd)
local win_git='/mnt/c/Program Files/Git/bin/git.exe'
for loc in $win_locs; do
if [[ $cur_dir == $loc* ]] then
$win_git "$@"
return $?

Desires:

  • Create artifacts with platform specified
    • os_cpu_abi_compiler - RoboRIO would be linux_armv7_armel_gcc4.8, for example. abi can be omitted if not needed, such as on desktop platforms.
    • Windows x64 example: win_x64_msvc14.0 <- msvc14.0 implies the abi.
  • No hacky google test workarounds
  • Easy addition and configuration of what platform we're building for
  • Precreated configurations for many popular coprocessors
    • RPI - rasbian, others
  • TK1
@333fred
333fred / Microsoft.Powershell_profile.ps1
Last active January 30, 2017 03:17
Microsoft.Powershell_profile.ps1
Import-Module PSReadLine
Set-PSReadlineKeyHandler -Key Tab -Function Complete
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
#region Smart Insert/Delete
# The next four key handlers are designed to make entering matched quotes
# parens, and braces a nicer experience. I'd like to include functions
@333fred
333fred / .gitconfig
Last active July 7, 2017 23:03
My .gitconfig with shortcuts
# Note: my aliases assume all commits will be signed with a gpg key. To not sign with a gpg key, remove the -S from the commit aliases
# If signing with a gpg key, make sure to set the gpg with git config --global user.signingkey KEY_ID_HERE
[user]
name = Fredric Silberberg
email =
signingkey =
[color]
ui = auto
[color "branch"]
current = yellow reverse
@333fred
333fred / .vimrc
Created March 9, 2016 23:07
Basic Racket Vim Config
set nocompatible
" Use Line Numbers
set number
set backspace=indent,eol,start
set showmode
set visualbell
syntax on
" Vundle Config
@333fred
333fred / README.md
Last active March 7, 2022 18:55
Basic Racket Emacs Setup

On Ubuntu, install the racket package with:

sudo apt-get install racket

On Arch Linux, install racket with:

sudo pacman -S racket

On Windows, install Racket from racket-lang.org. Put Racket.exe and Raco.exe on your path.