Skip to content

Instantly share code, notes, and snippets.

@KazKoboDev
KazKoboDev / codespaces_bash_prompt_theme.txt
Created October 11, 2024 05:40
This is a prompt theme I discovered in the official Docker Dev Environment container images. I liked it so much I wanted to include it in my own images.
# Codespaces bash prompt theme
__bash_prompt() {
local userpart='`export XIT=$? \
&& [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \
&& [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`'
local gitbranch='`\
if [ "$(git config --get codespaces-theme.hide-status 2>/dev/null)" != 1 ]; then \
export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \
if [ "${BRANCH}" != "" ]; then \
echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \
@KazKoboDev
KazKoboDev / ml-ruby.md
Created May 7, 2016 00:57 — forked from gbuesing/ml-ruby.md
Resources for Machine Learning in Ruby

Resources for Machine Learning in Ruby

Gems

# How to use this file
# 1) Run gem install 'json' on the command line to install the json dependency
# 2) Place this file in your Starbound linux32 or linux64 directory
# 3) Run it on the command line using 'ruby read_contexts.rb coord' without qoutes (make sure you're in the linux32/linux64 directory)
require 'fileutils'
require 'json' # gem install 'json'
abort("Only 1 arguement may be specified") if ARGV.length > 1
@KazKoboDev
KazKoboDev / wcip_build.rb
Created February 1, 2015 20:18
This script builds a new version of the WeComeInPeace mod for Starbound. It must be run inside a directory next to the spawner.config file.
require 'fileutils'
require 'json'
template = ' {
"op": "replace",
"path": "/spawns/CREATURE/monsterParameters/aggressive",
"value": false
}'
puts "#{Time.now.strftime("%H:%M:%S")} : Scanning for aggressive aliens"
@KazKoboDev
KazKoboDev / npbd_build.rb
Last active August 29, 2015 14:14
This script builds a new version of the NoProjectileBlockDamage mod for Starbound when provided with an unpacked projectiles directory in the same space as the script itself.
require 'fileutils'
require 'json'
template = '[
{
"op": "test",
"path": "/actionOnReap/LOC/file",
"value": "PLACEHOLDER"
},
{
"op": "remove",