Skip to content

Instantly share code, notes, and snippets.

View rniswonger's full-sized avatar
🖖

Ryan Niswonger rniswonger

🖖
View GitHub Profile
@rniswonger
rniswonger / hyphenate.css
Last active October 7, 2017 22:04
CSS: Hyphenate / Break text
.hyphenate-text {
word-break: break-word; // for (non-mac) chrome
hyphens: auto; // for the rest
}
@rniswonger
rniswonger / rays.js
Last active November 16, 2016 00:27 — forked from alanedwardes/rays.js
Generates animated sun rays using HTML canvas
var rays = new Object({
canvas: false,
context: false,
offset: 0,
speed: 0.005,
animating: false,
color_1: '',
color_2: '',
mid_x: 0,
@rniswonger
rniswonger / wp-disable-plugin-update.php
Last active January 3, 2024 15:21
WordPress - Disable specific plugin update check
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) {
unset( $value->response['plugin-folder/plugin.php'] );
}
@rniswonger
rniswonger / script.js
Last active October 19, 2016 20:08
Scroll-away header
/**
* Header animation with requestAnimationFrame debounce
* https://www.html5rocks.com/en/tutorials/speed/animations/
*/
(function($) {
$(document).ready(function() {
var lastKnownScrollY = 0;
var lastUpdatedScrollY = 0;
var scrollCheck = false;
var showingHeader = false;
// Wes Bos
// https://twitter.com/wesbos/status/766703272887476224
function removeUTM() {
const loc = window.location;
if (loc.search.includes('utm')) {
if (window.history.replaceState) {
history.replaceState({}, '', loc.pathname);
} else {
loc.hash = '';
}
@rniswonger
rniswonger / config.json
Last active June 28, 2016 17:19 — forked from anonymous/config.json
Bootstrap Customizer Config - Minimum components for navbar w/dropdowns
{
"vars": {},
"css": [
"forms.less",
"responsive-utilities.less",
"navs.less",
"navbar.less",
"component-animations.less",
"dropdowns.less"
],
All attributes:
(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?
A specific attribute (ex. class):
(class)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']?
Test it:
https://www.debuggex.com/r/KL_pMoR8_pERK-ah
Credit:
@rniswonger
rniswonger / Maban Website Contract.md
Created November 25, 2015 00:37 — forked from maban/Maban Website Contract.md
My boilerplate contract

Website Contract [month] [year]

Description of this Contract

This contract is not meant to trick or deceive you; the intention is purely to protect both parties. I have tried to keep the wording as plain as possible, but if anything is unclear, please let me know and I will be more than happy to clarify it with you. Also, until you sign it, please feel free to request to change bits of it to suit your requirements.

In short, [client name] is contracting me, [my name], to [description of my role] between [start date and finish date].

By signing this, you are confirming that you have the power and ability to enter into this contract on behalf of [client's company].

@rniswonger
rniswonger / Table with fixed col and row headers (prototype).markdown
Last active August 29, 2015 14:26
Table with fixed col and row headers (prototype)

Table with fixed col and row headers (prototype)

Limited browser support, fixed size cells. I hope to make something more flexible.

A Pen by Ryan Niswonger on CodePen.

License.

@rniswonger
rniswonger / dabblet.css
Created February 22, 2012 19:30
buy button
/**
* buy button
*/
input {
background:#fff;
border:0px solid #d9e1f1;
font-size:20px;
line-height:20px;
padding:10px;