Skip to content

Instantly share code, notes, and snippets.

View overwine's full-sized avatar

John M. Overwine overwine

View GitHub Profile
@overwine
overwine / assault_rifle.php
Created October 4, 2012 17:20
Assault Rifle Page
__NOTOC__
<div id="row-top" style="clear: both; height:0px; width:100%;"> </div>
==Assault Rifle Overview ==
{| align="center" width="330" cellpadding="0" cellspacing="1" style="text-align:left; margin-right: 5px;"
| colspan="3" class="cert-header" style="text-align:center;" |Assault Rifles
|-
| style="text-align:center; width:33%; height:30px;" class="column-header" |[[File:Icon-small-tr.png|link=Terran Republic]]
| style="text-align:center; width:33%; height:30px;" class="column-header" |[[File:Icon-small-nc.png]]
| style="text-align:center; width:33%; height:30px;" class="column-header" |[[File:Icon-small-vs.png]]
<?php
/**
*
*/
class mysitePortfolio {
private static $carousel_id = 1;
/**
*
@overwine
overwine / achteeemell.html
Last active December 14, 2015 20:49
DERP
<li>
<div class="category">
<div class="cat-text">TYPE</div>
<div class="rotate-arrow-down"></div>
</div>
<div class="subcategories"style="display:inherit;">
<div class="clearfix subcategory">
<input type="checkbox" name="selcategory[0]" value="1"><label>APPETIZERS</label>
</div>
<div class="clearfix subcategory">
@overwine
overwine / dongs.css
Created May 13, 2013 14:56
Some CSS bullshit
4,7c4,7
< src: url('../cartonslab/cartonslab.eot?#iefix') format('embedded-opentype'),
< url('../cartonslab/cartonslab.woff') format('woff'),
< url('../cartonslab/cartonslab.ttf') format('truetype'),
< url('../cartonslab/cartonslab.svg#cartonslab') format('svg');
---
> src: url('../cartonslab/cartonslab.eot?#iefix')
> format('embedded-opentype'), url('../cartonslab/cartonslab.woff')
> format('woff'), url('../cartonslab/cartonslab.ttf') format('truetype'),
> url('../cartonslab/cartonslab.svg#cartonslab') format('svg');
@overwine
overwine / form-shenanigans.php
Created August 23, 2013 15:18
Herpa, derpa.
$phone = $entry["5"];
function format_phone($phone) {
$phone = preg_replace("/[^0-9]/", "", $phone);
if (strlen($phone) == 7) {
return preg_replace("/([0-9]{3})([0-9]{4})/", "$2 $3", $phone);
} elseif (strlen($phone) == 10) {
return preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "$1 $2 $3", $phone);
function post_save($entry, $form) {
$post_url = "http://www.lasikplus.com/ischedule/action/contactRequest.lp";
function format_phone($phone) {
var_dump($phone);
$phone = preg_replace("/[^0-9]/", "", $phone);
$phone = preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "$1 $2 $3", $phone);
var_dump($phone);
return explode(' ', $phone);
@overwine
overwine / .htaccess
Created November 26, 2013 01:28
.htaccess making any www url go to the homepage
RewriteEngine On
# Ugh wordpress - wordpress apparently doesn't like it if you refer to the
# site interchangably between www.domain.com and domain.com, so rewrite
# the non-www version to the www version here to avoid problems. If we don't
# do this, going to domain.com/anything-at-all will redirect to the root of
# www.domain.com, which is not helpful.
# NOTE: This is a 302 redirect, not a 301, as at some point we might want to
# make the non-www site the "canonical" one
# FIX - redirets realmswork.com as well
<?php
/**
* WooCommerce Tax Settings
*
* @author WooThemes
* @category Admin
* @package WooCommerce/Admin
* @version 2.1.0
*/
@overwine
overwine / theworst.php
Created February 26, 2015 20:31
Terrible idea stuff.
<!doctype html>
<?php
/*if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if(!empty($_POST['locatezip'])){
$_POST['zip'] = $_POST['locatezip'];
$_POST['radius'] = $_POST['locateradius'];
$_POST['item'] = $_POST['locateitem'];
}
}*/
if (!empty($_SERVER['HTTP_CLIENT_IP']))
@overwine
overwine / fetch_locations.php
Created February 26, 2015 22:00
Stuff and things Lorie.
<?php
function findStores() {
//creating array of data to be posted
$post_data['item'] = $_POST['locateitem'];
$post_data['radius'] = $_POST['locateradius'];
$post_data['ip'] = $ip;
//traverse array and prepare data for posting
foreach ( $post_data as $key => $value) {