Skip to content

Instantly share code, notes, and snippets.

View ryanj's full-sized avatar
💭
LGTM

ryan jarvinen ryanj

💭
LGTM
View GitHub Profile
@ryanj
ryanj / base64encode.php
Created November 21, 2014 22:17
encode assets to be loaded inline as dataURIs
<?php
function base64DataUri($sFile)
{
// Switch to right MIME-type
$sExt = strtolower(substr(strrchr($sFile, '.'), 1));
switch($sExt)
{
case 'gif':
<!-- Opening -->
<section>
<section>
<h1 style="font-size: 3.4em; margin-top: -25px;">Connecting Containers</h1>
<img src="https://raw.githubusercontent.com/codemiller/connecting-containers/gh-pages/images/boxillusion.png" style="width: 210px; background-color: inherit; border: none; box-shadow: none;"/>
<h3>Building a PaaS with Docker and&nbsp;Kubernetes</h3>
<p>
Presented by<br/>
<a href="http://www.codemiller.com">Katie Miller</a> / <a
href="http://twitter.com/codemiller">@codemiller</a><br/>
@ryanj
ryanj / README.md
Last active August 29, 2015 14:15
How to get Fedora21 minimal runing on the RaspberryPi 2.0

Fedora21 minimal on RPi-2

This guide assumes that your SD slot is available at /dev/sdb. Make sure to substitute the correct value for your own SD device (or you might wipe out one of your hard disks)!! USE AT YOUR OWN RISK

  1. Download the experimental Fedora spin:
curl -O http://www.digitaldreamtime.co.uk/Fedora/Pi2B-Minimal-armhfp-21-5-20150211-1.img.xz
@ryanj
ryanj / Release-Pipelines-for-the-Open-Web.html
Last active August 29, 2015 14:16
Building Release Pipelines on the Open Web - Fluent 2015 - @ryanj
<section>
<section id='Open-Web-Release-Pipelines' data-markdown>
##Building
# Release
# Pipelines
for the
## Open Web
{
"apiVersion": "v1beta1",
"items": [
{
"apiVersion": "v1beta1",
"containerPort": 8080,
"id": "frontend",
"kind": "Service",
"port": 5432,
"selector": {
# in your .bash_profile / .bashrc
alias pushit='git push && open http://www.youtube.com/watch?v=vCadcBR95oU'
# to get the file into your .bash_profile
echo "alias pushit='git push && open http://www.youtube.com/watch?v=vCadcBR95oU'" >> .bash_profile
@ryanj
ryanj / org_schedule.py
Created July 17, 2012 23:53
Eventbrite - convert a repeating event to an Organizer Schedule
import eventbrite
your_app_key = 'YOUR_APP_KEY_HERE'
your_user_key = 'YOUR_USER_KEY_HERE'
repeating_event_eid = 3919635736
eb_client = eventbrite.EventbriteClient({'app_key': your_app_key, 'user_key': your_user_key})
def convert_repeat_to_organizer_schedule(evnt):
#clear existing repeat_schedule
eb_client.event_update({'id': evnt['id'], 'repeat_schedule': 'clear'})
@brianleroux
brianleroux / web-based-diagramming-tools.md
Created September 8, 2012 19:37
I asked about web based diagramming tools on twitter. Ppl answered!
@andrewxhill
andrewxhill / index.html
Last active December 10, 2015 15:38
Simple CartoDB + D3 earthquake example
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Easy earthquakes</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://libs.cartocdn.com/cartodb.js/v2/cartodb.js"></script>
<style type="text/css">
body{
@matb33
matb33 / aws-sdk.js
Created April 12, 2013 19:09
AWS SDK Smart Package -- Exposes the SDK as AWS.SDK and provides a helper function to sign URLs
AWS = (function () {
var SDK = Npm.require("aws-sdk");
var crypto = Npm.require("crypto");
var url = Npm.require("url");
function getAuthenticatedURL(fullUrl, accessKeyID, secretAccessKey, expires) {
/*
Signature = URL-Encode( Base64( HMAC-SHA1( YourSecretAccessKeyID, UTF-8-Encoding-Of( StringToSign ) ) ) );