Skip to content

Instantly share code, notes, and snippets.

View vinbarnes's full-sized avatar

Kevin R. Barnes vinbarnes

View GitHub Profile
@vinbarnes
vinbarnes / Doorbell.env
Created May 16, 2023 14:48 — forked from noelhibbard/Doorbell.env
This gist shows how to pull the local stream from a Wyze camera and then push it to an RTMP server.
# Edit and rename this file and then place it in /etc/wyzecam-to-rtmp
WYZE_EMAIL="joeblow@example.com"
WYZE_PASSWORD="wyzepasshere"
WYZE_CAMERA_NAME="Doorbell"
RTMP_URL="rtmp://127.0.0.1/live/doorbell"
@vinbarnes
vinbarnes / setup.sh
Created March 30, 2022 14:15 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@vinbarnes
vinbarnes / solar_system_objects.sql
Created May 30, 2021 01:31 — forked from pamelafox/solar_system_objects.sql
solar_system_objects.sql
/*
Solar system objects
Adapted from: http://en.wikipedia.org/wiki/List_of_Solar_System_objects_by_size
Collected by: https://www.khanacademy.org/profile/patrick809/programs
*/
CREATE TABLE solar_system_objects(
body TEXT
, mean_radius NUMERIC /* km */
, mean_radius_rel NUMERIC /* relative to earth */
, volume NUMERIC /* 10^9 km^3 */
/*
Sales from an online furniture store
Collected by: https://www.khanacademy.org/profile/charlesb2000/
*/
CREATE TABLE sales(
ID INTEGER NOT NULL PRIMARY KEY
, transaction_date TEXT
, product TEXT
, price INTEGER
, payment_type TEXT
@vinbarnes
vinbarnes / repl.js
Created April 4, 2019 01:47 — forked from blackwright/repl.js
Sequelize REPL
// Require the REPL module
// and models
let repl = require('repl').start({});
const models = require('./models');
// Make the `models` object
// a global variable in the
// REPL
repl.context.models = models;
@vinbarnes
vinbarnes / optparse-template.rb
Created February 13, 2019 12:22 — forked from rtomayko/optparse-template.rb
Ruby optparse template
#!/usr/bin/env ruby
#/ Usage: <progname> [options]...
#/ How does this script make my life easier?
# ** Tip: use #/ lines to define the --help usage message.
$stderr.sync = true
require 'optparse'
# default options
flag = false
option = "default value"
@vinbarnes
vinbarnes / capybara cheat sheet
Created March 2, 2016 04:29 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
#!/bin/bash
#
# Blame @gnarmis if this doesn't work
#
# Put this anywhere on your $PATH (~/bin is recommended). Then git will see it
# and you'll be able to do `git recent-branches`.
#
# Show top 5 most recent branches:
# $ git recent-branches | head -n 5
#
# Task: Implement the rcat utility and get these tests to pass on a system
# which has the UNIX cat command present
# To see Gregory Brown's solution, see http://github.com/elm-city-craftworks/rcat
# Feel free to publicly share your own solutions
rrequire "open3"
working_dir = File.dirname(__FILE__)
gettysburg_file = "#{working_dir}/data/gettysburg.txt"
@vinbarnes
vinbarnes / README.md
Last active August 29, 2015 14:11 — forked from FokkeZB/README.md