This document is a high-level working draft. Where and how this documentation will exist is still up for discussion.
Note that list items that are crossed out mean that essential documentation
for that topic has been merged.
#!/bin/bash | |
echo | |
echo "Homebridge install script for Hassbian" | |
echo | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run with sudo. Use \"sudo ${0} ${*}\"" 1>&2 | |
exit 1 | |
fi |
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
# Upload new product images to S3 and deliver via Cloudfront | |
Spree.config do |config| | |
attachment_config = { | |
s3_credentials: { | |
access_key_id: ENV.fetch("S3_ACCESS_KEY"), | |
secret_access_key: ENV.fetch("S3_SECRET"), | |
bucket: ENV.fetch("S3_BUCKET"), | |
}, |
NOTE: this gist is outdated, refer to this repository instead - https://github.com/ghaiklor/iterm-fish-fisher-osx
// Google Forms Slack Notification | |
// Andy Chase <github.com/andychase> | |
// License: CC0 1.0 Universal <creativecommons.org/publicdomain/zero/1.0> | |
// Install 1: This code goes in ( tools > script editor... ) of your google docs form | |
// Install 2: ( resources > current project triggers ) ( [onSubmit], [from Form], [On form submit] ) | |
// Setup 1: Put your slack api url below | |
var POST_URL = "https://hooks.slack.com/services/"; | |
function onSubmit(e) { |
class CreateEmailTest | |
include Lotus::Interactor | |
def initialize(params) | |
@params = params | |
@email_test = EmailTest.new(@params[:email_test]) | |
end | |
def call | |
Operation.new(self, email_test: @email_test). |
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
These steps were sufficient to upgrade Cult Cosmetics to Spree 2.0.4 from 1.3.3. Here are some details on our environment.
class RouteRecognizer | |
attr_reader :paths | |
# To use this inside your app, call: | |
# `RouteRecognizer.new.initial_path_segments` | |
# This returns an array, e.g.: ['assets','blog','team','faq','users'] | |
INITIAL_SEGMENT_REGEX = %r{^\/([^\/\(:]+)} | |
def initialize |