Skip to content

Instantly share code, notes, and snippets.

View ritcheyer's full-sized avatar
🏠
Working from home

Eric Ritchey ritcheyer

🏠
Working from home
  • E&J Design
  • Lincoln, CA
View GitHub Profile
@ritcheyer
ritcheyer / Premailer.php
Created May 4, 2016 14:34 — forked from Synchro/Premailer.php
PHP interface class for the Premailer API
<?php
/**
* Premailer API PHP class
* Premailer is a library/service for making HTML more palatable for various inept email clients, in particular GMail
* Primary function is to convert style tags into equivalent inline styles so styling can survive <head> tag removal
* Premailer is owned by Dialect Communications group
* @link http://premailer.dialect.ca/api
* @author Marcus Bointon <marcus@synchromedia.co.uk>
*/
@ritcheyer
ritcheyer / post-update-slack
Created January 11, 2016 09:20 — forked from dopiaza/post-update-slack
Git post-update commit hook to post a message to a Slack channel. Uses https://gist.github.com/dopiaza/6449505
#!/bin/bash
# This script is designed to be called from a git post-update hook
# Typical usage
# In your post-update hook, the first parameter is the branch ref. So in post-update, you would
# invoke this script something like this:
# /usr/local/bin/post-update-slack $1 <branch to match> <token> <channel>
# The script will only post to slack if the branch being updated matches the one listed as <branch to match>
# Use "any" to match any branch (hopefully you don't have a branch called "any")
@ritcheyer
ritcheyer / gulpfile.js
Created November 13, 2015 21:22 — forked from samuelhorn/gulpfile.js
My gulpfile for new projects
/*******************************************************************************
1. DEPENDENCIES
*******************************************************************************/
var gulp = require('gulp'); // gulp core
sass = require('gulp-sass'), // sass compiler
uglify = require('gulp-uglify'), // uglifies the js
jshint = require('gulp-jshint'), // check if js is ok
rename = require("gulp-rename"); // rename files
concat = require('gulp-concat'), // concatinate js
@ritcheyer
ritcheyer / dash-listen-3.py
Created August 21, 2015 17:22 — forked from eob/dash-listen-3.py
for hacking an Amazon Dash to record poops and stuff
from scapy.all import *
import requests
import time
MAGIC_FORM_URL = 'http://put-your-url-here'
def record_poop():
data = {
"Timestamp": time.strftime("%Y-%m-%d %H:%M"),
"Measurement": 'Poopy Diaper'
}
<?php
/*
Plugin Name: SVG Upload
Plugin URI: http://www.lewiscowles.co.uk
Description: Super PHP Plugin to add Full SVG Media support to WordPress, I should live in {$webroot}/wp-content/plugins/ folder ;)
Author: Lewis Cowles
Version: 1.0
Author URI: http://www.lewiscowles.co.uk/
*/
add_action('admin_init', 'add_svg_upload');

DZSlack

What is this?

The following files add some view keybindings and other functional and styling changes to Slack when used inside of a Fluid app.

Specifically:

  1. <cmd>-number will bring you to the respective starred channel. For example, if you have 4 starred channels, <cmd-1> will bring you to the first starred channel, <cmd-2> to the second, etc.
@ritcheyer
ritcheyer / slack.css
Last active August 29, 2015 14:01 — forked from banderson623/slack.css
.light_theme .message {
color: #fff;
font-size: 16px;
}
.message .mention {
font-weight: bold;
}
.member_preview_link,
@ritcheyer
ritcheyer / 0_reuse_code.js
Created September 27, 2013 05:09
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

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@ritcheyer
ritcheyer / 1. Example.scss
Created October 22, 2012 21:37 — forked from Integralist/1. Example.scss
Sass Mixin for CSS3 Animations
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}