Skip to content

Instantly share code, notes, and snippets.

View matthewcrist's full-sized avatar

Matthew Crist matthewcrist

View GitHub Profile
@matthewcrist
matthewcrist / ssl_puma.sh
Last active January 28, 2016 00:00 — forked from tadast/ssl_puma.sh
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 4096
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@matthewcrist
matthewcrist / 0_reuse_code.js
Last active August 29, 2015 14:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
---
title: Images
layout: guide
---
<h1>Images</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero erat, adipiscing non pellentesque eu, rhoncus et metus. Nunc bibendum elementum ante sed pharetra. Morbi varius egestas diam, sit amet commodo nunc malesuada sed. Quisque et commodo mauris. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero erat, adipiscing non pellentesque eu, rhoncus et metus. Nunc bibendum elementum ante sed pharetra. Morbi varius egestas diam, sit amet commodo nunc malesuada sed. Quisque et commodo mauris.</p>
<figure class="hero-image">
@matthewcrist
matthewcrist / breakpoint-example.html
Created April 3, 2012 20:00 — forked from stonehippo/breakpoint-example.html
Targeting tablets with media queries, but not tripping those queries on the desktop
<!-- The breakpoint widths below are from a specific client project and probably should be moved to standard 320/460/768 breakpoints in other usage -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<style>
body {color: #333; background-color: #eee; font-family: 'Georgia';}
.hidden { display: none; text-indent: 3em;}
@media screen and (max-width: 653px) {

javascript:

var pp = "/images/test/images_";
var images_p1 = [ pp + '1.jpg', pp + '2.jpg', pp + '3.jpg', pp + '4.jpg', pp + '5.jpg' ];
var images_p2 = [ pp + '6.jpg', pp + '7.jpg', pp + '8.jpg', pp + '9.jpg', pp + '10.jpg' ];

$('.preview').slideview(function(e) { return e.id == "p1" ? images_p1 : images_p2; }, {width: 100, height: 100});

html: