Skip to content

Instantly share code, notes, and snippets.

View rupl's full-sized avatar
💭
¯\_(ツ)_/¯

Chris Ruppel rupl

💭
¯\_(ツ)_/¯
View GitHub Profile
@rupl
rupl / keybase.md
Created October 25, 2017 13:13
Keybase verification

Keybase proof

I hereby claim:

  • I am rupl on github.
  • I am rupl (https://keybase.io/rupl) on keybase.
  • I have a public key ASBJ5Kg18-StJUZUlN_qgReYd2buApAqCdTjui4FVxqEago

To claim this, I am signing this object:

@rupl
rupl / greenhouse-v2.ino
Created June 20, 2017 12:24
Så Ett Frö — Greenhouse v2, June 2017
/**
* Code to run a basic automatic greenhouse.
*
* - Temp/humidity sensor
* - Soil moisture sensor
* - Water pump
* - Ventilation fan
*
* @see http://saettfro.com/vaxthus/
*/
@rupl
rupl / biking-jacket.ino
Last active May 30, 2022 17:56
Code to power an Arduino biking jacket. Build details here: https://chrisruppel.com/blog/lilypad-arduino-biking-jacket/
/*!
* LilyPad Arduino Biking Jacket
*
* Each sleeve has a button and indicator light near the cuff.
* - Pressing the a button turns the blinker on for a few cycles.
* - Hold the same button to stop it sooner.
* - Pressing both buttons turns on hazard mode.
* - Hold one button to disable hazard mode.
*
* Made with <3 for Karin :)
@rupl
rupl / granimation.css
Last active November 1, 2018 08:10 — forked from anonymous/my.css
CSS Gradient Animation — https://www.gradient-animator.com/
background: linear-gradient(270deg, #430fe4, #234ae8, #15a32d, #f55519, #d71abf);
background-size: 1000% 1000%;
-webkit-animation: AnimationName 6s ease infinite;
-moz-animation: AnimationName 6s ease infinite;
-o-animation: AnimationName 6s ease infinite;
animation: AnimationName 6s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
@rupl
rupl / sw-font-load.js
Created December 7, 2015 11:54
Use Service Worker to load fonts async/direct via client-side logic.
// Load fonts async by default
// Load sync from SW cache when available.
//
// Snippet assumes your Service Worker caches fonts as part of installation, so that
// an 'activated' Service Worker means the fonts are cached with 100% confidence.
if (
'serviceWorker' in navigator &&
navigator.serviceWorker.controller !== null &&
navigator.serviceWorker.controller.state === 'activated'
) {
@rupl
rupl / kitty-resize.jquery.js
Last active August 29, 2015 14:27
Make kitties appear when someone resizes the window
// Paste this into your console to give it a try!
(function($){
$(window).resize(function() {
$('<img src="http://placekitten.com/g/' + (window.innerWidth - 100) + '/' + (window.innerHeight - 100) + '">')
.css({'position': 'absolute', 'top': '50px'})
.appendTo('body');
});
})(jQuery);
@rupl
rupl / gist:e6db5e3f93ffbddfae6a
Created July 20, 2015 11:43
github 301 redirect for repositories
$ curl -i "https://github.com/team-sass/breakpoint"
HTTP/1.1 301 Moved Permanently
Server: GitHub.com
Date: Mon, 20 Jul 2015 11:42:31 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Status: 301 Moved Permanently
Content-Security-Policy: default-src *; script-src assets-cdn.github.com collector-cdn.github.com; object-src assets-cdn.github.com; style-src 'self' 'unsafe-inline' 'unsafe-eval' assets-cdn.github.com; img-src 'self' data: assets-cdn.github.com identicons.github.com www.google-analytics.com collector.githubapp.com *.githubusercontent.com *.gravatar.com *.wp.com; media-src 'none'; frame-src 'self' render.githubusercontent.com gist.github.com www.youtube.com player.vimeo.com checkout.paypal.com; font-src assets-cdn.github.com; connect-src 'self' live.github.com wss://live.github.com uploads.github.com status.github.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com
Public-Key-Pins: max-age=300; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-s
@rupl
rupl / latest-body-field.sql
Created July 9, 2015 11:52
SQL to extract latest revision of body field out of Drupal 7
SELECT node.title, body.body_value
FROM node
LEFT JOIN node_revision ON node.vid = node_revision.vid
LEFT JOIN field_revision_body AS body ON node_revision.vid = body.revision_id;
-- WHERE node.type = 'whatever'
-- etc
@rupl
rupl / .gitignore
Last active February 12, 2016 07:23
WebDriverCSS + BrowserStack + local server
# Avoid saving full screenshots and failed comparisons, but always save selector-based references.
visual/failed/*
visual/reference/*
!visual/reference/*baseline*
@rupl
rupl / url-shortcuts.txt
Created May 21, 2015 04:52
Using Chrome's custom search engines as shortcuts!
Command | URL | Example | Comment
--------+-----------------------------------------------------------------+---------------------+-------------------
gh | https://github.com/%s | gh rupl/unfold | GitHub repo
npm | https://www.npmjs.com/package/%s | npm gulp-sass | npm module
wpt | http://www.webpagetest.org/?url=%s | wpt example.com | WebPageTest.org
psi | https://developers.google.com/speed/pagespeed/insights/?url=%s | psi example.com | PageSpeed Insights
acme | https://client.atlassian.net/browse/ACME-%s | acme 1234 | Clients' tickets