Skip to content

Instantly share code, notes, and snippets.

View RobertAKARobin's full-sized avatar

Robin (Robert) Thomas RobertAKARobin

View GitHub Profile
@RobertAKARobin
RobertAKARobin / express-step-by-step.md
Last active December 2, 2015 18:54
How to start a MEN (not MEAN) app, step-by-step

One Developer's View

These are the steps you might take to complete this project. There's no right way to make an Express app -- nor any other app.

This walkthrough gets you up to the point of having an app that renders in the browser, makes database queries, and has AJAX -- but is still very bare-bones. The examples below use a "Movie" model, but that can be replaced with anything else.

We strongly recommend that you use the "drive/steer" pairing model on this: only one computer is open, with only one person working on it, while another person directs them and tells them what to type.

Get something on Github

@RobertAKARobin
RobertAKARobin / eq_vs_at_vs_amp.html
Created December 17, 2015 14:25
Angular Directives: `=` vs `@` vs `&`
<!DOCTYPE html>
<html>
<head>
<title>Angular</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
</head>
<body ng-app="myApp">
<div ng-controller="myCtrl as VM">
<a my-dir
attr1="VM.sayHi('Juan')"
@RobertAKARobin
RobertAKARobin / atti.md
Last active December 21, 2015 22:55
Taking care of Atti

Taking Care of Atti

Thank you so much for cat sitting our baby!

Dry food: We generally keep her dry food bowl full. The bag is under the kitchen sink. Kitty treats are in the left-most drawer in the kitchen, by the doorway.

Wet food: In the evenings she gets 1/4 of a can of wet food. You can put it in the little glass Pyrex dish on the kitchen floor. The wet food is stored in the fridge with a blue reusable lid. Feel free to use one of the knives sitting in the dish drainer to scoop it out -- just rinse it off well afterward!

Water: She drinks out of the fountain on the floor by the kitchen table. If you can hear water splashing in the fountain, then it could probably use more water. There's a blueish-purplish pitcher on top of the fridge: just fill it up and pour it on the fountain. We'll change the fountain's water filter before we leave, so you shouldn't need to worry about that.

@RobertAKARobin
RobertAKARobin / ruby_oop.md
Created January 4, 2016 19:19
Intro to Ruby OOP

Intro to Object-Oriented Programming in Ruby

AKA OOP: There it is

Learning Objectives

  • Define Object-Oriented Programming, and its benefits
  • Define and differentiate between classes and objects
  • Create a Ruby class with an initialize method
  • Instantiate an object from a class and interact with it
  • Use binding.pry to play with code live
@RobertAKARobin
RobertAKARobin / offset.html
Created January 5, 2016 16:36
Weird button vertical offset
<!DOCTYPE html>
<html>
<head>
<title>Buttons</title>
<style>
*{
margin:0;
padding:0;
border:0;
border-collapse:collapse;
@RobertAKARobin
RobertAKARobin / peeps.rb
Created March 31, 2016 16:16
Student matcher
names = [
"Alice",
"Bob",
"Carol",
"David",
"Eliza",
"Frank",
"Gretchen",
"Harry",
"Irene",
var people = [/*some data*/];
var sortable = function(callback){
return {
isSorting: false,
onclick: function(event){
var element = this;
people.sort(function(personA, personB){
var valA = callback(personA);
var valB = callback(personB);

Keybase proof

I hereby claim:

  • I am robertakarobin on github.
  • I am robertakarobin (https://keybase.io/robertakarobin) on keybase.
  • I have a public key ASCTvAWos0stNEYIkdK8HyBZZARNmRFoHHr7xOJcJH0_EQo

To claim this, I am signing this object:

@RobertAKARobin
RobertAKARobin / index.html
Last active October 11, 2018 16:59 — forked from Jeff-Mott-OR/index.html
Untitled benchmark #jsbench #jsperf (http://jsbench.github.io/#69e72becc163a625fbec3f1d773ea0b7) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Untitled benchmark #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
const fs = require('fs')
const rx = {
fail: /^Request timeout/i,
time: /^(\d\d:\d\d:\d\d\.?\d*)/i,
seq: /icmp_seq=(\d+)/i,
dur: /time=([\d\.]+) ms$/i
}
const log = []