Skip to content

Instantly share code, notes, and snippets.

View bweave's full-sized avatar

Brian Weaver bweave

  • Atlanta, GA USA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am bweave on github.
  • I am bweave (https://keybase.io/bweave) on keybase.
  • I have a public key whose fingerprint is 72B5 2EA1 B031 1820 74D9 406E 5D3B F756 C1FE 1645

To claim this, I am signing this object:

@bweave
bweave / pagination_wip.cr
Created March 11, 2020 13:43
Attempting to roll some pagination in Amber Framework
class User < Granite::Base
connection pg
table users
column id : Int64, primary: true
column email : String?
timestamps
end
class Pet < Granite::Base
@bweave
bweave / cloudSettings
Last active December 30, 2020 02:26
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-12-30T02:26:03.000Z","extensionVersion":"v3.4.3"}
@bweave
bweave / cloudSettings
Created August 30, 2018 19:23
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-08-30T19:23:04.267Z","extensionVersion":"v3.1.1"}

Keybase proof

I hereby claim:

  • I am bweave on github.
  • I am bweave (https://keybase.io/bweave) on keybase.
  • I have a public key ASBkkWcOzybdmhgJ6ocPIv-xwpVkA36Fa0DtDcxVP_7gBwo

To claim this, I am signing this object:

@bweave
bweave / keymap.c
Last active June 6, 2018 18:22
Atreus62 Layout
// this is the style you want to emulate.
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
#include QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _DEFAULT 0
@bweave
bweave / day_1.rb
Created December 1, 2017 15:23
AOC - Day 1
class InverseCaptcha
def initialize(captcha)
@captcha = captcha
end
def sum
digits.each_with_index.reduce(0) do |sum, (int, i)|
sum += int if int == digits[i+1]
sum += int if (i == digits.size - 1) && (int == digits.first)
sum
commit 406da140a2fc90bea14557eaa954f6dd48483924
Author: Brian Weaver <bdrums@gmail.com>
Date: Mon Aug 7 16:58:19 2017 -0400
WIP
diff --git a/spec/rufo_spec.rb b/spec/rufo_spec.rb
index 3ddd8da..7c6558a 100644
--- a/spec/rufo_spec.rb
+++ b/spec/rufo_spec.rb
@bweave
bweave / car_searches_controller.rb
Created July 7, 2017 20:22
Setting up Car Search Scraping
#...
def show
@cars = Gtr.fetch
end
#...
@bweave
bweave / double-first-name-checker.php
Last active August 3, 2016 18:21
Some Interview Questions
<?php
/**
* Imagine you are asked to implement a class that is one of potentially several "qualification" checks for a person object.
* Your class is responsible for finding "double first name" scenarios on the person object's first_name property.
*
* The scenarios you must check for are:
* - "Bob and Susan"
* - "Bob & Susan"
* - "Bob Susan"