Skip to content

Instantly share code, notes, and snippets.

View uberbrady's full-sized avatar

Brady Wetherington uberbrady

View GitHub Profile
@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 / 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;
[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)
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
@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'
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 / 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'");
@uberbrady
uberbrady / co_thunk.js
Created December 21, 2016 23:24
Using 'co' with Thunks instead of Promises
const co = require('co')
function gen () {
console.warn('Beginning wait for gen')
return (callback) => {
setTimeout( () => {
console.warn("waiting finished for 'gen'")
callback(null,7)
},2000)
}
#!/usr/bin/env ruby
a=[]
1_000_000.times do |what|
a+=["froopty@blorp.norb"]
end
p "A length is: #{a.count}"
<?php
$arr=[];
for($i=0;$i<1000000;$i++) {
$arr[]="poopiedoop@fart.nuckle";
}
print count($arr);