Skip to content

Instantly share code, notes, and snippets.

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

Chris Ruppel rupl

💭
¯\_(ツ)_/¯
View GitHub Profile
@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 / saturn.pl
Created May 20, 2015 05:16
ASCII art of Saturn that creates an ASCII animation of Saturn. Original author unknown.
#!/usr/bin/perl
;;;;;;
;;;;;;;;;;;
;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;
+$I=sub{+s+^+ ;;;;;;; ;;;;;;;;;
$"x$_[1]+gem;$/x$_# ;;;; ;;;;;;;;
@rupl
rupl / gulpfile.js
Last active September 25, 2019 15:13
Sample Gulp setup. Watches JS to JSHint, watches two themes for Sass+Compass compilation.
/**
* @file
* Gulpfile that controls frontend development tasks. Just the basics!
*
* Installation: type `npm install` in your console.
* Usage: type `gulp` in your console.
*/
/* jslint node: true */
'use strict';
@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 / 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 / user-actions.js
Last active May 11, 2018 22:46
A CasperJS script to demonstrate simple user navigation actions on a website. This sample accompanies a blog post about CasperJS found at http://fourword.fourkitchens.com/article/simulate-user-actions-casperjs
/**
* @file
* Simulating user actions with CasperJS. This script explores the ability to
* use Casper for navigation just like a user would: clicking the page and
* entering text to submit a form. This script accompanies a blog post from
* Four Kitchens:
*
* @see http://fourword.fourkitchens.com/article/simulate-user-actions-casperjs
*/
@rupl
rupl / drupal-test.js
Last active November 18, 2017 23:24
This sample accompanies a blog post series about CasperJS found at http://fourword.fourkitchens.com/article/testing-drupal-casperjs
/**
* @file
* Testing a demo of Drupal. The script will log in and check for various
* features in Drupal core. This demo was inspired by a similar script for
* a Wordpress site. The original script was written by Henrique Vicente.
*
* @see https://github.com/henvic/phantom-casper-simple-talk/blob/master/wordpress.js
*/
// Set up variables to visit a URL and log in.
@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 / picturefill-test.js
Last active July 4, 2017 10:44
A CasperJS script to test the canonical Picturefill demo. This sample accompanies a blog post series about CasperJS found at http://fourword.fourkitchens.com/article/using-casperjs-test-picturefill
/**
* @file
* Testing to see if Picturefill selects the right source at multiple
* viewport sizes.
*/
// Define the suite of tests and give it the following properties:
// - Title, which shows up before any of the pass/fails.
// - Number of tests, must be changed as you add tests.
// - suite(), which contains all of your tests.