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')
I had no problem with gist, james.
#!/bin/sh
#
# Slight modification to the original: https://gist.github.com/4323782
# This uses `cut` because it's Zelda, Link wouldn't use perl! He cuts
# with his sword.
#
# Works best with blinking text; the last heart will blink
# when you have less than 25% of your battery life remaining.
BATTERY="$(pmset -g ps | tail -1 | cut -f 2 |cut -f 1 -d ';' | cut -f 1 -d '%')"

Chili Con Carne

=============== This shit is awesome. It's hot, so nut up pansy.
Don't like it that way? Leave out some peppers and spices.
Green bell pepper is for color, substitute another red or yellow for a sweeter taste.
Like different beans? Add them shits too, get wild with Emeril.
Want this to be even better? Cook/mix everything the night before, put in the fridge. Then cook it all day.

Ingredients