Skip to content

Instantly share code, notes, and snippets.

View overwine's full-sized avatar

John M. Overwine overwine

View GitHub Profile
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Admin extends Admin_Controller
{
public function index()
{
die(ENVIRONMENT);
//$this->load->model('Cats');
//$data['cats'] = $this->Cats->get_cats();
@overwine
overwine / index.js
Created June 1, 2012 15:24
I'm a damn nub.
$('.checkbox').click(function(e){
if ($('.sprite-checked').length > 3) {
$("#compare-slide").slideUp(400);
return false;
}
if ($(this).hasClass('sprite-unchecked')) {
if ($('.sprite-checked').length > 1) {
@overwine
overwine / delete_bunch.php
Created June 21, 2012 14:17
Silly functions.
<?php
$deleteData = trim($_POST['bunch_id']);
$con = mysql_connect("nuts","penis","balls");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("chiquita-momcom", $con);
@overwine
overwine / scrollzz.js
Created July 19, 2012 20:22
My shitty scroller
$("#work").click(function() {
$('html, body').animate({
scrollTop: $("#vimeo").offset().top-300
}, 500);
});
@overwine
overwine / fail.html
Created July 24, 2012 19:56
Crappy Table
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="38"><img src="http://www.chiquitamoms.com/wp-content/themes/chiquitamoms/images/email_promo/chiquita_email_02.jpg" style="display:block;" width="20" height="278"></td>
<td width="256"><p>Hi *|MMERGE3|*,</p>
<p>Miss Chiquita was featured on the <em>WE</em> Network&rsquo;s show 'Having It All' on July 28 at 8:30 AM EST/PT. But, you can catch the show early, exclusively through the Chiquita Moms community! Watch Miss Chiquita chatting with Nikki Taylor, a fellow Chiquita Mom who, just like you, strives to have it all while juggling a career and her four kids. </p>
<p>Watch and get some fresh ideas for quick, tasty snacks for you and your kids. Then share some of your own fun, healthy snacks with your fellow Chiquita Moms in the <a href="http://www.chiquitamoms.com/engage">engage section &gt;</a></p></td>
<td width="306"><img src="http://www.chiquitamoms.com/wp-content/themes/chiquitamoms/images/email_promo/
@overwine
overwine / bertts.terxt
Created July 24, 2012 21:05
lerts erf bertts
BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BERTTS BE
@overwine
overwine / m_master.php
Created August 2, 2012 18:28
master controller and m_master(model)
<?php
class M_Master extends CI_Model
{
public function findURI( $uri )
{
$query = $this->db->where( 'uri', $uri )->limit(1)->get('pages');
if ( $query->num_rows > 0 )
{
echo '<pre>';
@overwine
overwine / butts.js
Created August 20, 2012 17:51
scroll function
$navs = $('#navigation a');
$navs.click(function(e) {
e.preventDefault();
alert($navs);
var target = $(this).attr('href'),
y = $(target).offset().top,
speed = 500; /*Math.abs($('window').scrollTop() - y) * .5;*/
<div class="work-scrollable">
<p class="top shaw">We started by reaching out to influential bloggers to create relationships and start the conversation about designing from the floor up.</p>
<p>After we had a solid foundation, we created a Facebook presence and seeded it with content that people care about: colors, interior decorating and patterns.</p>
<p>Then we put it all together with a blogger conference featuring a tie-in with HGTV to promote Shaw's new line<span class="dotdotdot">...</span> <span class="hide-copy">of carpets. We gave the bloggers expert advice and let them design a room literally from the ground up. Then we used that as the basis for a Facebook contest to build on the momentum and get even more word of mouth buzz.</span></p>
<p><span class="hide-copy">The results? 39,000+ new Likes in 30 days and 244+ million word of mouth impressions. Who says people don't talk about floors?</span></p>
<a href="" class="shaw-more" onclick="return false;">MORE</a>
@overwine
overwine / form-popup.js
Created September 7, 2012 19:09
Form that I'm going to need 12 different versions of...
$('a.login-window').click(function() {
//Getting the variable's value from a link
var loginBox = $(this).attr('href');
//Fade in the Popup
$(loginBox).fadeIn(300);
//Set the center alignment padding + border see css style
var popMargTop = ($(loginBox).height() + 24) / 2;