Skip to content

Instantly share code, notes, and snippets.

View somewhatabstract's full-sized avatar
💭
thinking of projects I have no time for

Jeff Yates somewhatabstract

💭
thinking of projects I have no time for
View GitHub Profile
@somewhatabstract
somewhatabstract / starship.toml
Created October 26, 2022 16:51
Starship powerline config
format = """
[](#9A348E)\
$time\
[](bg:#DA627D fg:#9A348E)\
$username\
[](fg:#DA627D bg:#FCA17D)\
$directory\
[](fg:#FCA17D bg:#86BBD8)\
$c\
$elixir\
@somewhatabstract
somewhatabstract / readme.md
Last active October 12, 2022 23:11
Modified `code` command to run `code-insiders` if `code-insiders` is running instead

You may have both stable and insiders releases of Visual Studio Code installed. If you're like me, you'll end up trying to open a file with the code command when you meant code-insiders. This little edit makes it so that the code script knows that and opens it in the right place for you.

  1. Make sure to have installed the code and code-insiders command into your path by using the command palette
  2. Edit the code command (e.g. code "$(which code)")
  3. Add the following to the script, after the remote terminal handling but before everything else:
IS_VS_CODE_RUNNING="$(test "$(ps aux | grep "/[A]pplications/Visual Studio Code.app/Contents/MacOS/Electron")" && echo 1 || echo 0)"
IS_VS_CODE_INSIDERS_RUNNING="$(test "$(ps aux | grep "/[A]pplications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron")" && echo 1 || echo 0)"
@somewhatabstract
somewhatabstract / .bashrc
Last active October 12, 2022 21:50
BashRC function for printing some versions out to the console on console open
printversions() {
echo " git: $(git --version | cut -d' ' -f3)"
echo " go: $(go version | cut -d' ' -f3 | cut -c3-)"
echo "java: $(java -version 2>&1 | head -n 1 | awk -F '"' '{print $2}')"
echo "node: $(nvm version | cut -c2-) (latest: $(nvm version-remote $(nvm version | cut -c2- | cut -d'.' -f1) | cut -c2-))"
echo " npm: $(npm --version)"
echo "ruby: $(ruby -v | cut -d' ' -f2)"
echo "rust: $(rustc --version | cut -d' ' -f2)"
}
@somewhatabstract
somewhatabstract / .gitconfig
Created October 12, 2022 18:45
Git Config snippet: VSCode for editing, merging, and diffing
[core]
editor = code --wait
[diff]
tool = vscode
[difftool]
prompt = false
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[merge]
tool = vscode
@somewhatabstract
somewhatabstract / AssemblyInfo.cs
Last active July 24, 2017 04:10
Getting appveyor to do prerelease and release nuget packages based on branch versus tag builds
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle( "MyAssembly" )]
[assembly: AssemblyDescription( "" )]
[assembly: AssemblyConfiguration( "" )]
@somewhatabstract
somewhatabstract / gist:a272c06eba306ae87d2a
Created December 29, 2014 02:12
Reflectance array test
var five = require("johnny-five"),
board = new five.Board();
board.on("ready", function() {
var eyes = new five.IR.Reflect.Array({
emitter: 13,
pins: ["A0", "A1", "A2", "A3", "A4", "A5"]
});