Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am colbyr on github.
  • I am colbyr (https://keybase.io/colbyr) on keybase.
  • I have a public key whose fingerprint is 33D5 1529 A71B 368A DFC1 D156 9BAA 0B2D 69C8 902F

To claim this, I am signing this object:

@colbyr
colbyr / example-form.js
Created March 9, 2016 23:02
form state management with controlled components and partial application
import { partial } from '_';
import API from './API';
export default React.createClass({
getInitialState() {
return {
username: '',
password: '',
};
},
@colbyr
colbyr / fix-host-logins.diff
Created June 9, 2015 01:21
fix host logins
commit 50881d92b0f1f5b11d56fb8dbaeb49be5b7469db
Author: Colby Rabideau <[email protected]>
Date: Sat May 9 23:33:48 2015 -0400
fix host logins
* check facebook user id instead of the `nickname` field which seems to have disappeared and caused all this trouble in the first place
* update `aws-sdk` to `v1.64`
* update `omniauth-facebook` to `v1.6.0`
* update `nokogiri` (an `aws-sdk` dep that wouldn't build) to `v1.6`
Unhandled Exception
Message:
Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?
Location:
/data/ber.it/htdocs/bundles/requests/library/Requests/Transport/fsockopen.php on line 56
Stack Trace:
@colbyr
colbyr / game.js
Created May 4, 2013 01:32
# Game Model this is the game structure: the profit/cost attributes are from the **COSTS** response after init
Game = {
'profit': 'INTEGER',
'w-cost': 'INTEGER',
'j-cost': 'INTEGER',
'd-cost': 'INTEGER',
'timestamp': 'INTEGER'
};
<?php
// migration
DB::query('ALTER TABLE users MODIFY first_name VARCHAR(255) DEFAULT NULL');
DB::query('ALTER TABLE users MODIFY last_name VARCHAR(255) DEFAULT NULL');
// rollback
DB::query('ALTER TABLE users MODIFY first_name VARCHAR(255) NOT NULL');
DB::query('ALTER TABLE users MODIFY last_name VARCHAR(255) NOT NULL');
@colbyr
colbyr / password_confirmation.php
Last active December 14, 2015 07:58
password confirmations with aware
<?php
$model = new User();
$model->password = Input::get('password');
$model->save([], [], function ($model) {
return $model->password === Input::get('confirm_password');
})
@colbyr
colbyr / hex_code.js
Created February 27, 2013 22:36
hex char codes in js
'~'.charCodeAt(0).toString(16); //=> 7e
@colbyr
colbyr / grid-slide.html
Created February 8, 2013 19:44
gridz in deck.js
<section class="slide">
<div class="container">
<div class="row">
<div class="col-6">
left column
</div>
<div class="col-6">
right column
</div>
</div>
@colbyr
colbyr / vcenter.html
Created February 7, 2013 21:35
deck.js vcenter
<section class="slide">
<div class="vcenter">
<h1>Title</h1>
<h3>Sub-Title</h3>
</div>
</section>