Skip to content

Instantly share code, notes, and snippets.

View airbr's full-sized avatar
🏠
Working from home

Morgan Murrah airbr

🏠
Working from home
View GitHub Profile
pi@raspberrypi:~/Documents/RaspAlarm $ webpack
Hash: 37ee781105d39d10c02e
Version: webpack 1.14.0
Time: 29708ms
Asset Size Chunks Chunk Names
public/bundle.js 1.39 MB 0 [emitted] main
+ 357 hidden modules
ERROR in ./app/components/Main.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../../private/keys.js in /home/pi/Documents/RaspAlarm/app/components
@airbr
airbr / self-eq-this-vs-bind.md
Created February 16, 2017 20:21 — forked from jashmenn/self-eq-this-vs-bind.md
Javascript var self = this; vs. .bind

The Problem

In Javascript this is bound in unexpected ways. Functions, in particular, create a new 'this' and so when you want to keep a reference to an "outer" object you sometimes see the pattern:

var self = this;

as in:

var self = this;
@airbr
airbr / gist:cfc9a2fe83c27b1ab72f7c898113e9f1
Created January 4, 2017 20:34 — forked from ryansobol/gist:5252653
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@airbr
airbr / dec32016.md
Last active December 4, 2016 15:24
SQL Bootcamp Query notes

Examples worked through with DataGrip & the following basic table structure:

The data source is based on a hypothetical data-center with different rackspace units, the current/planned rentals, prices and configuration of the racks.

nb some odd comments left in there for my own reference like -- // foo has some kind of meaning about getting a return of foo number of rows from the query run individually

Table name Fields Types/Notes
configuration cpu, memory, hd, speed
@airbr
airbr / Pretty Git History Tree & Log
Created November 6, 2016 05:16
Essential Git Alias's
alias.g log --graph --all --branches --decorate --pretty=format:'[%C(auto)%h%Creset][%C(cyan)%an %ar%Creset]%C(auto)%d%Creset %s %C(auto)%Creset'
alias.ls log --stat --all --decorate
If you are reading this HTML comment I appreciate your efforts to go a bit deeper under the surface of my website and portfolio.
I must give credit to W3Schools for my adaptation of their CSS3 animation at the following URL incorporated into this post: http://www.w3schools.com/css/css3_animations.asp
Silly little CSS animations were something that was fun right at the beginning of my journey into web development and kept me motivated. Ask me about them and Ill know you have taken some time to look over my stuff and have an appreciation for simple fun along the way of gaining harder skills.
-->
<div id="animated_div">
Welcome<span style="font-size:10px;"></span></div>
@airbr
airbr / FizzbuzzRecursive.js
Created August 16, 2016 13:58 — forked from FrancoB411/FizzbuzzRecursive.js
Fizzbuzz with recursion instead of a loop.
function fizzbuzz(num) {
if(num === 0) { //base case
return 1;
}if(num < 0) { //termination case
return console.log("Positive numbers only, please.");
}if((num % 3 === 0) && (num % 5 === 0)) { //fizzbuzz conditionals
console.log("fizzbuzz");
@airbr
airbr / introrx.md
Created August 16, 2016 13:06 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
function submit() {
var selected = $(".modal-body input:checked").val();
for (i = 0; i < questions.length; i++) {
if ( selected === questions[i].correctAnswer ) {
console.log(selected + " was selected");
console.log("You selected the correct answer:" + questions[i].correctAnswer);
var scs = i;
}
if ( scs === 0 || scs === 5 || scs === 10 || scs === 15 || scs === 20 ) {
score1 = score1 + 10;
@airbr
airbr / index.html
Created August 1, 2016 16:00 — forked from anonymous/index.html
jQuery Modal Credit @dr Mike Hopper
<div class="bs-example">
<!-- Button HTML (to Trigger Modal) -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal" data-num="0">Question 1</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal" data-num="1">Question 2</button>
<!-- Modal HTML -->
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">