Skip to content

Instantly share code, notes, and snippets.

@tpryan
tpryan / ribbon.html
Last active April 11, 2024 00:21
Github Ribbon in CSS.
<!--
Copyright (c) 2012 Terrence Ryan
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following
conditions:
@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:
<!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 / 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 / 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 / circles.css
Created January 23, 2012 17:32
Venn - HTML
#venn div{
height: 360px;
width: 360px;
border-radius:180px;
-khtml-border-radius:180px;
-moz-border-radius:180px;
-webkit-border-radius:180px;
border: 1px solid #000;
display: table;
float: left;
@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>