Skip to content

Instantly share code, notes, and snippets.

@stinoga
stinoga / console.js
Last active August 29, 2015 13:57
Get Titles on the Page (jQuery)
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
jQuery.noConflict();
var array = []
$(".title > a").each(function() {
array.push($(this).text());
});
@stinoga
stinoga / list.py
Created October 1, 2015 22:01
List Arguments in Python
import inspect
def func(a, b, c):
frame = inspect.currentframe()
args, _, _, values = inspect.getargvalues(frame)
print 'function name "%s"' % inspect.getframeinfo(frame)[2]
for i in args:
print " %s = %s" % (i, values[i])
return [(i, values[i]) for i in args]
@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 / 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.