Skip to content

Instantly share code, notes, and snippets.

@conroywhitney
conroywhitney / private_fork.md
Created April 8, 2023 13:24 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@conroywhitney
conroywhitney / prepare-commit-msg
Last active December 22, 2021 20:12 — forked from lukebergen/prepare-commit-msg
Git commit message hook for reviewed clubhouse
#!/usr/bin/env ruby
# Automatically adds clubhouse id and link to commit messages based on branch name
file = ARGV[0]
branch_path = `git symbolic-ref -q HEAD`.split("\n")[0] # Somthing like refs/heads/myBranchName
branch_name = branch_path.split("/").last
id = branch_name.split("-").last
non_ammend = `head -n1 #{file}` == "\n"
@conroywhitney
conroywhitney / amp_purge.rb
Created February 20, 2021 17:18
Ruby on Rails implementation of purging AMP cache (https://developers.google.com/amp/cache/update-cache)
# app/models/amp_purge.rb
#
# frozen_string_literal: true
#
# Ruby on Rails implementation of purging AMP cache
# https://developers.google.com/amp/cache/update-cache
#
# Replace "example" with your domain
#
# Run like:
@conroywhitney
conroywhitney / yelp_fusion_schema.json
Last active February 20, 2018 19:44
UNOFFICIAL GraphQL Schema for Yelp's Fusion API - No claims are made as to correctness or completeness
{
"data": {
"__schema": {
"queryType": {
"name": "Query"
},
"mutationType": null,
"subscriptionType": null,
"types": [
{
@conroywhitney
conroywhitney / add-text-canvas-from-input-field-typed_cs_fixed.html
Created March 14, 2017 19:47
Fixed version of CoursesWeb's Tutorial: Add Canvas from Input Field Typed
<!-- fixed version of http://coursesweb.net/javascript/add-text-canvas-from-input-field-typed_cs -->
<h4>Canvas</h4><canvas width="350" height="180" id="cnv1"></canvas><br/>
Text: <input type="text" id="text_cnv" size="40" maxlength="250" />
<script type="text/javascript">
// function to clear the canvas
// cnv = the object with the canvas element
function clearCanvas(cnv) {
var ctx = cnv.getContext('2d'); // gets reference to canvas context

Keybase proof

I hereby claim:

  • I am conroywhitney on github.
  • I am conroywhitney (https://keybase.io/conroywhitney) on keybase.
  • I have a public key whose fingerprint is 11DD 6270 B114 287E 6D7F 7BFB CDCF 06C1 D3C2 73E4

To claim this, I am signing this object:

/*
* Copy this into the Chrome JS console at one of the following domains
* dropbox.com, slack.com, getbootstrap.com, or semantic-ui.com
* Depending on which xpath is set (defaults to theme.buttons.primary)
* Will output all CSS styles for the target element
*/
var
hostname = window.location.hostname,
domain = hostname.substr(0, hostname.indexOf('.', 4)).replace('www.', '').replace('-', ''),
themes = {
@conroywhitney
conroywhitney / api_user_stats_product_counts.json
Created November 12, 2012 18:02
API User Stats Product Counts
{
"status": "OK",
"result": {
"user": {
"avatar": {
"thumb": "http://s3.amazonaws.com/kore/production/profiles/avatars/5816/three6/IMG_0101_2.jpg",
"original": "http://s3.amazonaws.com/kore/production/profiles/avatars/5816/original/IMG_0101_2.JPG"
},
"profile": {
"website": "<a href=\"http://www.quirkybuy.com\">Click Here to return quirky's Main Page.</a> <a href=\"http://www.quirky.com/participate?q=%28spacebar-mike%29&filters[]=most_recent\">------ <br><br>Click Here to see MY IDEAS!</a>",