Skip to content

Instantly share code, notes, and snippets.

@tpryan
tpryan / github-protect-branch
Created April 6, 2020 22:39
Batch setting protection on a branch of a github repo.
#!/bin/bash
# Protect branches in a repository.
# (c) 2020 tpryan
# Author: github.com/tpryan
# MIT License, see below
# Adapted from https://gist.github.com/miraculixx/b4c30db06bb1f3b56057
function help {
echo "Add collaborators to one or more repositories on github"
echo ""
echo "Syntax: $0 -u user -p password [-b] [-o] -r repo1,repo2 "
@tpryan
tpryan / Makefile
Created April 19, 2017 21:54
Kubernetes Makefile
BASEDIR = $(shell pwd)
RULELIST = $(shell gcloud compute forwarding-rules list --format='value[terminator=" "](name)')
include Makefile.properties
all: cluster app
app: db api frontend
# Requests a GKE cluster
cluster:
/*
****** Colors extracted from Reflow ******
// hex value RGB value Closest color Used isBackground?
//---------------------------------------------------------------------
// #000000 rgb(0,0,0) black 12 times
// #282729 rgb(40,39,41) *darkslategray 9 times
// #ffffff rgb(255,255,255) white 5 times background
// #7da7a6 rgb(125,167,166) *cadetblue 1 time background
// * means that color name is the closest match
<!DOCTYPE html>
<html>
<!-- This code is only meant for previewing your Reflow design. -->
<head>
<link rel="stylesheet" href="boilerplate.css" />
<link rel="stylesheet" href="page1.css" />
<meta charset="utf-8">
<meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" />
<script>var __adobewebfontsappname__ = "reflow"</script>
<script src="http://use.edgefonts.net/source-sans-pro:n4,n9,n7,i7,i4,n3,i3,n6,i6,i9,n2,i2:all.js"></script>
@tpryan
tpryan / 1.css
Last active December 16, 2015 19:38
.chathead{
width: 150px;
height: 150px;
border-radius: 75px;
border: 4px solid #FFFFFF;
box-shadow: 1px 1px 5px rgba(0,0,0,.5);
position: absolute;
right: -10px;
}
@tpryan
tpryan / Edge1.html
Created October 31, 2012 15:00
Edge Animate Accessibility
<div id="Stage" class="EDGE-171675818">
</div>
<!doctype html>
<html lang="en">
<head>
<!--...
Skipping rest of header
... -->
<!--Adobe Edge Runtime-->
<script type="text/javascript" charset="utf-8" src="index_edgePreload.js"></script>
<style>
.edgeLoad-EDGE-556270 { visibility:hidden; }
@tpryan
tpryan / main.js
Created July 11, 2012 00:27
Sample of Menu removing for Brackets.
define(function (require, exports, module) {
'use strict';
var CommandManager = brackets.getModule("command/CommandManager"),
Menus = brackets.getModule("command/Menus");
// Function to run when the menu item is clicked
function handleHelloWorld() {
menu.removeMenuItem(MY_COMMAND_ID);
@tpryan
tpryan / build1.xml
Created May 23, 2012 16:09
Ant notification with Say
<target name="notifyWebDev" description="Plays an audio file">
<echo message="Playing Audio Alert"/>
<exec executable='say' failonerror='true'>
<arg value='Development website is ready'/>
</exec>
</target>
@tpryan
tpryan / css.css
Created April 12, 2012 21:55
CSS Regions Example
#content {
-webkit-flow: 'foo';
-webkit-flow-into: foo;
}
.region {
background-color: white;
-webkit-box-sizing: border-box;
content: -webkit-from-flow('foo');
-webkit-flow-from: foo;