Skip to content

Instantly share code, notes, and snippets.

View greenweb's full-sized avatar

Rew Rixom greenweb

View GitHub Profile
@greenweb
greenweb / class.TTT_Contactfields.php
Created February 14, 2012 19:45 — forked from anonymous/class.TTT_Contactfields.php
Manager for WordPress’ contact fields
<?php
/**
* Manage WordPress contact fields.
* Usage:
require './class.TTT_Contactfields.php';
$TTT_Contactfields = new TTT_Contactfields(
array (
'Twitter'
, 'Facebook'

Easy Sign Up - add no spam text

Use jQuery to add a No Spam disclaimer above the send button.

A Pen by Andy on CodePen.

License.

@greenweb
greenweb / Anthony.signature.markdown
Last active August 29, 2015 13:56
Anthony's Signature
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@greenweb
greenweb / 0_reuse_code.js
Last active August 29, 2015 14:15
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
@greenweb
greenweb / wp-bash
Last active August 29, 2015 14:15
Download the current version of WordPress to your shell account's home directory and unzip it From http://codex.wordpress.org/UNIX_Shell_Skills
wget http://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz
@greenweb
greenweb / javascript_resources.md
Last active August 29, 2015 14:15 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@greenweb
greenweb / wp-bash
Last active August 29, 2015 14:15
Bash Script to Download latest WordPress and unzip
# Download latest WordPress and uncompress
cd ~
#mkdir -p /path/to/your/potentially/existing/folder
wget http://wordpress.org/latest.tar.gz
tar zxf latest.tar.gz
mv wordpress/* ./
# Grab our Salt Keys
wget -O /tmp/wp.keys https://api.wordpress.org/secret-key/1.1/salt/
@greenweb
greenweb / WP-CLI Install
Created March 6, 2015 09:55
WP-CLI Install
# WP-CLI Install
if [ ! -e /var/www/wp-cli/bin/wp ]; then
printf "\nInstalling wp-cli\n"
git clone git://github.com/wp-cli/wp-cli.git /var/www/wp-cli
cd /var/www/wp-cli
composer install
else
printf "\nSkip wp-cli installation, already available\n"
fi
# Link wp to the /usr/local/bin directory
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: Plugin Class Demo
* Description: How I am using the base class in plugins.
* Plugin URI:
* Version: 2012.09.29
* Author: Thomas Scholz
* Author URI: http://toscho.de
* License: GPL
* Text Domain: plugin_unique_name