Skip to content

Instantly share code, notes, and snippets.

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

Ryan Baumbach rbaumbach

🏠
Working from home
View GitHub Profile
{
"status": "ok",
"totalResults": 3457,
"articles": [
{
"source": {
"id": null,
"name": "Seekingalpha.com"
},
"author": "Victor Dergunov",
@rbaumbach
rbaumbach / YavaScripts-02.js
Last active September 12, 2018 14:54
Having "fun" with axios and handling
const axios = require('axios');
// Note: axios.get() returns a promise
const getPhoto = () => {
return axios.get('https://jsonplaceholder.typicode.com/photos/1');
};
console.log('Return of getPhoto:', getPhoto());
@rbaumbach
rbaumbach / yavaScripts-01.js
Last active August 18, 2018 23:10
Having "fun" with YavaScript objects
// Creating ALF object
const alf = {
name: 'Gordon Shumway',
'home-planet': 'Melmac',
likes: ['cats', 'jokes', 'mischief'],
eatCat: function() {
return new Promise(function(resolve, reject) {
const isAbleToCatchCat = Math.floor(Math.random() * 2);
@rbaumbach
rbaumbach / yavaScripts-00.js
Last active August 14, 2018 20:07
Having "fun" with YavaScripts
// Classic completionHandler callback scenario
// Creating the timerFunction()
const timerFunction = function(completionHandler) {
console.log('Setting first timeout of 1 second');
setTimeout(function() {
console.log('Setting second timeout of 2 seconds');
@rbaumbach
rbaumbach / ubt2.txt
Last active May 8, 2018 00:00
ubt2.txt
// Tests that I used to get my solution
import Quick
import Nimble
@testable import AlgorithmsAndDataStructuresInSwift
// Problem: Write a method that returns the total amount of words for a given input word
// ex: Input String: "Billy goat is a fiery, but kind goat that is also a black goat"
// word to search for: "goat" -> 3
// These are the tests that I used to make sure my problem worked for circular references. It also describes the problem
// that I was trying to solve.
import Quick
import Nimble
@testable import AlgorithmsAndDataStructuresInSwift
// Problem: Write a method that takes a "Movie" object and integer value n
// The method should return an array of the highest ranking movies no larger than n.
#!/bin/bash
# nodereinstall
# credit: http://stackoverflow.com/a/11178106/2083544
# get sudo
sudo -v
# check to see if npm is installed
IS_NPM_MISSING=$(which npm)
if [[ -z $IS_NPM_MISSING ]]; then
@rbaumbach
rbaumbach / keybase.md
Created September 25, 2014 02:58
keybase.md

Keybase proof

I hereby claim:

  • I am rbaumbach on github.
  • I am rbaumbach (https://keybase.io/rbaumbach) on keybase.
  • I have a public key whose fingerprint is 4587 A453 D349 0003 27EF B83E C018 DAC9 50B6 00DD

To claim this, I am signing this object: