Skip to content

Instantly share code, notes, and snippets.

View uberbrady's full-sized avatar

Brady Wetherington uberbrady

View GitHub Profile
@uberbrady
uberbrady / async2.js
Last active December 16, 2016 18:12
Basic asynchronous behavior using Generators
"use strict";
var it=null;
//this looks okay-ish?
function gen()
{
console.warn("Beginning wait for gen");
setTimeout(function () {
console.warn("waiting finished for 'gen'");
diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php
index dcc93e0..0e16bfd 100644
--- a/app/Http/Controllers/ReportsController.php
+++ b/app/Http/Controllers/ReportsController.php
@@ -33,7 +33,7 @@ class ReportsController extends Controller
{
/**
- * Returns a view that displaysthe accessories report.
+ * Returns a view that displays the accessories report.
@uberbrady
uberbrady / terrible.diff
Created September 29, 2016 04:58
Horrible Diff of Misery
diff --git a/.env.example b/.env.example
index f9a3012..13b742f 100644
--- a/.env.example
+++ b/.env.example
@@ -31,8 +31,6 @@ MAIL_PASSWORD=YOURPASSWORD
MAIL_ENCRYPTION=null
MAIL_FROM_ADDR=you@example.com
MAIL_FROM_NAME='Snipe-IT'
-MAIL_REPLYTO_ADDR=you@example.com
-MAIL_REPLYTO_NAME='Snipe-IT'
The menagerie
Space seed
Balance of Terror
The trouble with Tribbles
Let it be your last battle field
The city on the edge of forever
Plato’s step children
Amok time
[Error] ReferenceError: Can't find variable: Symbol
run (vendor-b6b12bcf862619e53725dd7f8554af30.js, line 3)
join (vendor-b6b12bcf862619e53725dd7f8554af30.js, line 3)
join (vendor-b6b12bcf862619e53725dd7f8554af30.js, line 9)
(anonymous function) (vendor-b6b12bcf862619e53725dd7f8554af30.js, line 9)
c (vendor-b6b12bcf862619e53725dd7f8554af30.js, line 2)
fireWith (vendor-b6b12bcf862619e53725dd7f8554af30.js, line 2)
ready (vendor-b6b12bcf862619e53725dd7f8554af30.js, line 2)
o (vendor-b6b12bcf862619e53725dd7f8554af30.js, line 1)
@uberbrady
uberbrady / 404_means_bad_plumbing.php
Last active August 29, 2015 14:13
Status Codes = status of pipes/plumbing
<?php
$f=REST_Thing::something("http://example.com/blah?id=$foo");
$obj=json_parse($f->body());
if($obj->error) {
//$foo is not found
return null;
} else {
return $obj->thing;
@uberbrady
uberbrady / gist:5356efe71367430acb58
Last active August 29, 2015 14:09
How to get mcrypt in php working for OS X 10.10.?
cd into the php-5.5.x directory thing - then:
574 ./configure --prefix=/usr --without-iconv
575 sudo make install-headers
that should get you the php.h files - where people expect to find them.
I ran out of autoconf thing?
@uberbrady
uberbrady / gist:5da2f4fffeff00ac23fa
Created August 20, 2014 02:51
fpm-caused ofe error?
Error: Cannot find module './build/Release/ofe.node'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/lib/node_modules/ofe/ofe.js:1:78)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
@uberbrady
uberbrady / gist:dd12f2f2d8e9fe5a0e6d
Last active August 29, 2015 14:01
First the "wrong" way then the "right" way, and how that can get out of hand.
class Person
def age
Date.now-birthyear
end
end
test "That a person has an age" do
p=Person.new 1974
travel_to 2014
assert(p.age==40)
@uberbrady
uberbrady / search.js
Created April 13, 2014 22:31
Some tweaks to Oliver Caldwell's excellent binary search Javascript function
binaryIndexOf=function (searchElement) {
'use strict';
var minIndex = 0;
var maxIndex = this.length - 1;
var currentIndex;
var currentElement;
console.warn("WE ARE LOOKING FOR: ",searchElement,"AKA",+searchElement);