Skip to content

Instantly share code, notes, and snippets.

View seanknox's full-sized avatar
🙋‍♂️

Sean Knox seanknox

🙋‍♂️
  • San Francisco, CA
View GitHub Profile
#!/bin/bash -e
az ad signed-in-user show --output json > $AZ_SCRIPTS_OUTPUT_PATH

Mac users

  1. First, install GNU tar: brew install --with-default-names gnu-tar
  2. Ensure at least 4GB RAM available to Docker for Mac

clone the repo

go get k8s.io/kubernetes && cd $GOPATH/src/k8s.io/kubernetes

@seanknox
seanknox / index.html
Created November 13, 2012 01:46
HTML code for HTML5 geolocation + Leaflet/OpenStreetMaps
<div style="width:800px; height:500px" id="map"></div>
<script type='text/javascript'>
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position){
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
});
# More about Sidekiq testing modes:
# https://github.com/mperham/sidekiq/wiki/Testing
require 'sidekiq/testing'
RSpec.configure do |config|
config.before(:example) do |example|
Sidekiq::Worker.clear_all
if example.metadata[:sidekiq] == :fake
Sidekiq::Testing.fake!

Prerequisites:

You'll need:

  1. A paid ngrok account
  2. A reserved domain on ngrok, e.g. the FQDN you're generating certs for
  3. A registed domain and access to change DNS records

How to

  1. Install certbot and ngrok
  • brew cask install certbot ngrok

Loading...

Use the Share button above save this diagnostic report to aid investigating your problem. Issues can be filed at https://github.com/LoopKit/Loop/issues.

Generated: 2019-05-28 21:48:24 +0000

Loop v1.10.0dev

Iteration: Mar 21 - April 17

Story Cycle time
Create links in tools and integrations article 0.56 day(s)
User can login on iOS 2.21 day(s)
User can pay using PayPal 5.67 day(s)
@seanknox
seanknox / spec--capybara_helpers.rb
Created May 10, 2014 03:01
RSpec + Capybara + Sauce Labs + Selenium (local or remote)
module CapybaraHelpers
class << self
def local_ip
ipv4_addr_info.ip_address
end
def setup_selenium_remote
app_host ||= ENV.fetch('SELENIUM_APP_HOST', local_ip)
Capybara.server_host = app_host
Capybara.app_host = "http://#{app_host}:#{Capybara.current_session.server.port}"
{
"cloud":"${TARGET_ENVIRONMENT}",
"tenantId": "${TENANT_ID}",
"subscriptionId": "${SUBSCRIPTION_ID}",
"resourceGroup": "${RESOURCE_GROUP}",
"location": "${LOCATION}",
"vmType": "${VM_TYPE}",
"subnetName": "${SUBNET}",
"securityGroupName": "${NETWORK_SECURITY_GROUP}",
"vnetName": "${VIRTUAL_NETWORK}",
require 'pry'
class Cache
attr_reader :value
attr_reader :version
attr_reader :versions
# we are storing values as Ruby hash values
def initialize(value = {}, version = 0, versions = [])
@value = value
@version = version