Skip to content

Instantly share code, notes, and snippets.

@technosailor
technosailor / HTML5 Foirms jQuery
Created September 5, 2012 20:35
BAsic HTML5 form structure with HTML5 validation and jQuery/JS handling of the form based on HTML5 validation status
<form onsubmit="return false;">
<input title="U.S. or Canadian Zip or Postal code is required" pattern="(\d{5}([\-]\d{4})?)|[A-Za-z][0-9][A-Za-z][ -]?[0-9][A-Za-z][0-9]" type="text" name="zip" value="" placeholder="Zip/Postal Code *" required />
<input title="Phone number in form 123-456-7890 is required" pattern="(\d{3}-?\d{3}-?\d{4})" type="tel" name="phone" placeholder="Phone *" required />
<input type="submit" name="submit" value="Submit" />
</form>
<script>
jQuery(document).ready(function(){
HTML5 U.S. Zip Code/Canadian Postal code Validation
<input class="lead-zip full-wide" title="U.S. or Canadian Zip or Postal code is required" pattern="(\d{5}([\-]\d{4})?)|[A-Za-z][0-9][A-Za-z] [0-9][A-Za-z][0-9]" type="text" name="lead-zip" placeholder="Zip Code *" required />
<?php
function custom_loop() {
global $amm_core;
global $wp_query;
$paged = ( get_query_var('page') ) ? get_query_var( 'page' ) : 1;
$wp_query = new WP_Query(
array(
'paged' => $paged,
'post_status' => 'publish',
'posts_per_page' => 5,
<?php
function tgm_beauty_review_layout() {
global $amm_core;
global $wp_query;
$paged = ( get_query_var('page') ) ? get_query_var( 'page' ) : 1;
$wp_query = new WP_Query(
array(
'paged' => $paged,
'post_status' => 'publish',
'posts_per_page' => 5,
<?php
global $wp_query;
$paged = (get_query_var('page')) ? get_query_var('page') : 1;
query_posts(
array(
'post_status' => 'publish',
'paged' => $paged,
'posts_per_page' => 5,
'post_type' => 'reviews',
#!/bin/bash
WP_STABLE='3.4.1'
# Make file structure
mkdir /var/www/$1
chown -R www-data:www-data /var/www/$1
chmod 755 /var/www
# Install WordPress latest stable
<?php
class My_Shoutcast_Embed {
public function __construct()
{
$this->hooks();
}
public function hooks()
Three considerations allay this concern. First, and most importantly, it is abundantly clear the Constitution does not guarantee that individuals may avoid taxation through
inactivity. A capitation, after all, is a tax that everyone must pay simply for existing, and capitations are expressly contemplated by the Constitution. The Court
today holds that our Constitution protects us from federal regulation under the Commerce Clause so long as we abstain from the regulated activity. But from its creation, the Constitution has made no such promise with respect to taxes. See Letter from Benjamin Franklin to M. Le Roy (Nov. 13, 1789) (“Our new Constitution is now established . . . but in this world nothing can be said to be certain,
except death and taxes”).
NCC-1701:easy-graphs aaron$ svn -r 562078 log
------------------------------------------------------------------------
r562078 | technosailor | 2012-06-21 18:24:32 -0500 (Thu, 21 Jun 2012) | 1 line
Otto and Nacin will kill me for rapid fire commits. That's all for now
------------------------------------------------------------------------
<?php
public function show_profile()
{
$profile = $this->profile_type;
$this->_amm_{$profile}_listing();
}