Skip to content

Instantly share code, notes, and snippets.

questionable ideas, made with 💛

bb010g bb010g

questionable ideas, made with 💛
Block or report user

Report or block bb010g

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bb010g / example-nixos.nix
Created Jun 1, 2019
update Nix tarball pins (e.g. Nixpkgs) from (n)vim
View example-nixos.nix
let nixpkgs = import ./nixpkgs.nix; in
import "${nixpkgs.nixpkgs}/nixos" {
configuration = {
imports = [
system = "x86_64-linux";
bb010g / .zshrc
Created Apr 29, 2019
example nice Zsh
View .zshrc
# sane zplug installation defaults
if [[ -z "$ZPLUG_HOME" ]]; then
if [[ -z "$ZPLUG_CACHE_DIR" ]]; then
bb010g / generate-tables.ts
Created Jan 25, 2019
bad type-level TypeScript ideas
View generate-tables.ts
import * as fs from 'fs';
import * as ts from 'typescript';
function flat<T>(arr: T[][]): T[] {
return arr.reduce((acc, val) => acc.concat(val), []);
const noDecorators = undefined;
const noImportClause = undefined;
const noInitializer = undefined;
bb010g /
Created Feb 9, 2018
Thoughts on combos

So, IMHO, you've got a few main aspects to a game's combos: execution, length, paths, variety, and flexibility.

Execution is what most people think of first when they think of combos. Good execution is a requirement to use combos, with good varying by game. Shorter combos are easier to execute, longer combos are harder. Let's go through some games. (I'll also start to tackle length here.)

  • If you want a game without combos, play Divekick.
  • Super Street Fighter 2 Turbo and Fantasy Strike are games that focus heavily on short combos that are based around jump-in > normal x special (x being cancel). You have to time your jump-in button correctly to leave your opponent in hitstun long enough for you to throw out and hit with your grounded normal, and then execute your special move before your cancel window is up. So, with Ryu, you might do jHK (jumping heavy kick) cMK (crouching medium kick) fireball (down>downforward>forward+heavy punch motion). This is short, but feels alright. The timing is satisfying becau
bb010g /
Created Jan 13, 2018
Keybase proof

Keybase proof

I hereby claim:

  • I am bb010g on github.
  • I am bb010g ( on keybase.
  • I have a public key ASCFVKliI5x9FgE9mXUlSXV8v06x1c_RMICP2xDKQs9Y6go

To claim this, I am signing this object:

bb010g /
Last active Oct 31, 2017
Ramblings on comments and libraries

Comments are for explaining non-obvious algorithms. If your function has a strange signature that doesn't make it's basic utility obvious, it should be renamed and the interface possibly rethought. If it's just a weird algorithm, document the crap out of it in documentation comments, not normal comments. If your internal code needs comments to be readable, refactor until the flow is understandable. If someone is left wondering why you did something a certain way, comment why. (A good sign for this is if it took you a while to come up with that piece of code.) If someone is left wondering what your code even does, rewrite it.

bb010g /
Last active Jul 12, 2017
Rust String vs &str

I get why String vs &str is a thing beginners struggle with, but it's never an issue in actual code, at least more than Vec<T> vs &[T] is. &[T] is a slice of borrowed memory. Vec<T> is owned memory. String and &str talk about verified UTF-8 strings. String -> Vec<u8>. &str -> &[u8]. Use in exactly the same way you would your normal hunk of memory types.

Beyond that, when you want to get a slice of your vector, you use &vec. When you want to get a &str out of your String, use &string. When you want to copy a slice into a new vector, you use

bb010g / rollin.pl6
Created Apr 29, 2017
Perl 6 dice roller
View rollin.pl6
use Crypt::Random;
class Roll {
has Int:D $.dice = 1;
has Int:D $.sides is required;
has Int:D $.constant = 0;
method parse(Str:D $str) {
if $str ~~ /[$<d>=(\d+) d]? $<s>=(\d+) [\+ $<c>=(\d+)]?/ { => ($<d>:v || 1).Int, sides => ($<s>:v).Int, constant => ($<c>:v).Int);
bb010g /
Created Sep 12, 2016
Project M Community Complete Matrix voice system

The PMCC Matrix room has a voice system in place to prevent spam. Here's what you need to know:

Why can't I talk?

A user must have voice status to send messages in If you're not voiced, you'll receive a permission error when you attempt to talk.

How do I get voice status?

bb010g / doc-networktables3.adoc
Created Jan 28, 2016
Network Tables Protocol Specification, Version 3.0
View doc-networktables3.adoc

Network Tables Protocol Specification, Version 3.0

This document defines a network protocol for a key-value store that may be read from and written to by multiple remote clients. A central server, most often running on a FIRST FRC robot controller, is responsible for providing information consistency and for facilitating communication between clients.

You can’t perform that action at this time.