Skip to content

Instantly share code, notes, and snippets.

View bb010g's full-sized avatar
💭
questionable ideas, made with 💛

bb010g bb010g

💭
questionable ideas, made with 💛
View GitHub Profile
@bb010g
bb010g / Package.hs
Last active August 29, 2015 14:04
Aura2 Package Test
{-# LANGUAGE RebindableSyntax, NoMonomorphismRestriction, ConstraintKinds #-}
{-# LANGUAGE NamedFieldPuns #-}
module Aura.Package
where
import YAPP
import Data.Rose --(Rose (rootLabel, getSubBush))
import qualified Data.Map.Lazy as M
@bb010g
bb010g / smashland.py
Created December 20, 2014 01:59
Super Smash Land FreePIE Config
def setKeyB(key, pred):
if pred:
keyboard.setKeyDown(key)
elif keyboard.getKeyDown(key):
keyboard.setKeyUp(key)
def tapKeyB(key, pred):
if pred:
keyboard.setKeyDown(key)
keyboard.setKeyUp(key)
io.popen: 'pwd' 2> /dev/null
Cloning into 'loverocks'...
os.execute: cd '/home/bb010g/src/loverocks' && test '-e' '/home/bb010g/.luarocks/lib/luarocks/rocks-5.3'
Results: 1
1 (number): 0
os.execute: cd '/home/bb010g/src/loverocks' && test '-d' '/home/bb010g/.luarocks/lib/luarocks/rocks-5.3'
Results: 1
@bb010g
bb010g / new-stage-list.txt
Created December 21, 2015 03:00
PM CC New Stage List Draft
Brawl ID | Normal Stage | Alternate Stage | Secret Stage | Link 1 | Link 2
STGBATTLEFIELD | Battlefield | Battlefield (Melee) | Battlefield (64) | Battlefield (64) - http://forums.kc-mm.com/Gallery/BrawlView.php?Number=210220 |
STGCRAYON | Yoshi's Island (Brawl) | Yoshi's Island (Melee) | N/A | |
STGDOLPIC | Delfino's Secret | Delfino Plaza | N/A | |
STGDONKEY | Venus Lighthouse | Mercury Lighthouse | N/A | Venus Lightouse - http://forums.kc-mm.com/Gallery/B
STAGE SLOT: Battlefield
A: Battlefield (Brawl)
L: Battlefield (Melee)
Z: Battlefield (N64) (With platform, size, & blast zone normalization)
STAGE SLOT: Final Destination
A: Final Destination (Melee)
L: Final Destination (Brawl) (With ledge fixes and size & blast zone normalization)
Z: Final Destination (N64) (With size & blast zone normalization)
@bb010g
bb010g / README.md
Created September 12, 2016 02:11
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 #pmcc:matrix.org. If you're not voiced, you'll receive a permission error when you attempt to talk.

How do I get voice status?

@bb010g
bb010g / rollin.pl6
Created April 29, 2017 06:19
Perl 6 dice roller
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+)]?/ {
self.new(dice => ($<d>:v || 1).Int, sides => ($<s>:v).Int, constant => ($<c>:v).Int);
@bb010g
bb010g / string-vs-str.md
Last active July 12, 2017 12:42
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
bb010g / comments-and-libraries.md
Last active October 31, 2017 07:32
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
bb010g / keybase.md
Created January 13, 2018 11:01
Keybase proof

Keybase proof

I hereby claim:

  • I am bb010g on github.
  • I am bb010g (https://keybase.io/bb010g) on keybase.
  • I have a public key ASCFVKliI5x9FgE9mXUlSXV8v06x1c_RMICP2xDKQs9Y6go

To claim this, I am signing this object: