Skip to content

Instantly share code, notes, and snippets.

@badsyntax
badsyntax / decisions.md
Last active May 4, 2020 17:24
Decisions and approaches to integrating spotless (via gradle) into vscode.

Decisions

Decisions and approaches to integrating spotless (via gradle) into vscode.

What do I want from spotless, ideally?

I want a list of code changes that I can apply to the text document in vscode, without spotless saving the text file.

Why can't I use spotlessCheck?

@badsyntax
badsyntax / gradle-tasks-server.bat
Created April 5, 2020 20:11
gradle-tasks-server.bat
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem gradle-tasks-server startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@badsyntax
badsyntax / vscode-grpc.md
Last active November 16, 2023 23:17
The problem with using grpc in a vscode extension

Background

I'm using websockets & protobuf in my vscode extension. I want to replace the message abstractions & inconsistent code with a nicely defined server/client interface using grpc.

The Problem

After working on some POC code and running the extension for the first time, I was faced with the following error:

Activating extension 'richardwillis.vscode-gradle' failed: 
@badsyntax
badsyntax / gradle-tasks-server.sh
Created February 16, 2020 07:01
The gradle tasks server startup script, generated by CreateStartScripts
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
@badsyntax
badsyntax / cyrillic-script-variations.md
Last active January 23, 2020 09:28
Possible useful resources on understanding Cyrillic script variations (mostly to support Bulgarian)

Understanding Cyrillic script variations

Possible useful resources on understanding Cyrillic script variations (mostly to support Bulgarian).

@badsyntax
badsyntax / macos_virtualbox_windows10_remote_desktop.md
Last active January 2, 2020 19:20
Use remote desktop to connect to headless windows virtualbox guest for improved graphic performance
@badsyntax
badsyntax / virtual_env_macos.md
Last active August 21, 2019 19:03
Setting up virtualenv on macos
brew install python
brew install python2
sudo easy_install pip
sudo pip install virtualenv
virtualenv -p python3.7 .
@badsyntax
badsyntax / .bashrc
Last active August 20, 2019 08:16
.bashrc
function nvm() {
echo "Lazy loading nvm..."
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm "$@"
}
function setup-prompt() {
if [ -f "$(brew --prefix)/etc/bash_completion" ]; then
. $(brew --prefix)/etc/bash_completion
@badsyntax
badsyntax / iterm2-colors.itermcolors
Created June 20, 2019 17:40
iterm2-colors.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
# Getting started
# 1. Install homebrew: https://brew.sh/
# 2. Install nvm: https://github.com/nvm-sh/nvm
# 3. Install other stuff:
# brew install bash-completion
# brew install git
# brew install lolcat
# brew install bash (then folllow instructions here: https://apple.stackexchange.com/a/292760)
# 4. Run: echo "source ./.bashrc" > ~/.bash_profile
# 5. Open a new iterm window