Skip to content

Instantly share code, notes, and snippets.

@stinoga
stinoga / SQL Query to create table
Created April 22, 2012 03:35
Jquery Ajax Email Signup Form in Wordpress
CREATE TABLE `mailinglist` ( `id` INT NOT NULL AUTO_INCREMENT , `email` TEXT NOT NULL, `user` TEXT NOT NULL , PRIMARY KEY ( `id` ) )
@stinoga
stinoga / .htaccess
Created May 18, 2012 03:16
Wordpress SEO friendly search rewrite rule
# search redirect
# this will take anything in the query string, minus any extraneous values, and turn them into a clean working url
RewriteCond %{QUERY_STRING} \\?s=([^&]+) [NC]
RewriteRule ^$ /search/%1/? [NC,R,L]
@stinoga
stinoga / post-commit
Created July 18, 2012 13:47
git post commit hook to push to remote repo
#!/bin/sh
# This hook is used to push a mirrored version of all committed files to your remote repo after they are commited
# Replace this variable with your remote repo name
REPO=dropbox
echo
echo "==== Sending changes to $REPO repo ===="
echo
@stinoga
stinoga / terminal
Created August 1, 2012 01:58
Saving SSH keys on Mac
# Run this in terminal to generate a key on your local machine
ssh-keygen -t rsa
# Next, SSH into your site and and copy the contents of the local file ~/.ssh/mykey.pub to the remote file ~/.ssh/authorized_keys
# I use vi for this, and you can have multiple keys in one file
@stinoga
stinoga / functions.php
Created August 1, 2012 02:32
Responsive images in Wordpress posts
// Remove image width/height, so everything can work responsively in posts
function strip_size($html, $id) {
$html = preg_replace('/\<(.*?)(width="(.*?)")(.*?)(height="(.*?)")(.*?)\>/i', '<$1$4$7>',$html);
return $html;
}
add_filter('get_image_tag', 'strip_size', 10, 2);
function remove_thumbnail_dimensions( $html ) {
$html = preg_replace( '/(width|height)=\"\d*\"\s/', "", $html );
@stinoga
stinoga / .htaccess
Created August 8, 2012 01:38 — forked from jswartwood/Run in LOCAL terminal...
Automatic Git deploys on Dreamhost
# deny access to the top-level git repository:
RewriteEngine On
RewriteRule \.git - [F,L]
@stinoga
stinoga / post-commit
Created August 13, 2012 12:25
Use Dropbox as a git repo
#!/bin/sh
# This hook is used to push a mirrored version of all committed files to your dropbox repo after they are commited (optional)
# Replace this variable with your remote repo name
REPO=dropbox
echo
echo "==== Sending changes to $REPO repo ===="
echo
@stinoga
stinoga / nav.js
Created December 14, 2012 02:24
Off canvas nav in SASS
// Off canvas navigation
$(document).ready(function() {
$('body').addClass('js');
var $menulink = $('.menu-link');
$menulink.click(function() {
event.preventDefault();

Contract

Revised date: [date]

Between Rob Stinogle and [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@stinoga
stinoga / index.html
Last active December 16, 2015 10:48
Responsive Google Maps
<section class="map cf">
<header>
<h3>Super Responsive Map</h3>
</header>
<div class="map" id="map"></div>
<ul class="mapinfo"></ul>
</section>