Skip to content

Instantly share code, notes, and snippets.

View christurnertv's full-sized avatar

Chris Turner christurnertv

View GitHub Profile
@christurnertv
christurnertv / TimeShift.php
Created July 6, 2013 02:25
PHP Class for handling time zone conversions.
<?php
class TimeShift {
public static $zones = array(
"America/New_York" => "Eastern",
"America/Chicago" => "Central",
"America/Denver" => "Mountain",
"America/Phoenix" => "Arizona",
"America/Los_Angeles" => "Pacific",
# make sure path is set properly
export PATH=/usr/local/bin:$PATH
# shortcuts to edit and reload bash profile
alias ebp="vim ~/.bash_profile"
alias rbp="source ~/.bash_profile"
# shortcut to edit hosts file
alias ehf="sudo vim /etc/hosts"
<?php
var_dump($_GET);
var_dump($_POST);
// delete from todo_table where id = ?
$todoList = [
'take out the trash',
<html>
<head>
<title>Exampe jQuery Page</title>
<style>
.invisible {
display: none;
}
</style>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
</head>
<html>
<head>
<title>Fade Out Sample</title>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
</head>
<body>
<img src="img/mole.jpg" style="display:none;">
<script>
@christurnertv
christurnertv / ajax.blade.php
Created April 11, 2014 19:09
jQuery Ajax and Laravel Demo
@extends('layouts.master')
@section('content')
<button id="btnGet" class="btn">Ajax Get</button>
<button id="btnPost" class="btn">Ajax Post</button>
@stop
@christurnertv
christurnertv / 1. app-config-local-app.php
Created April 17, 2014 19:02
Laravel Environment and Error Handing Config
<?php
return array(
'debug' => true,
);
<html>
<head>
<title>Disarm the BOM (Browser Object Model)</title>
</head>
<body>
<h1>Mission Impossible!</h1>
<button id="btnDisarm">Disarm the BOM!</button>
<script>
var detonationTimer = 10; // seconds
<html>
<head>
<title>Contact Manager</title>
</head>
<body>
<button id="btnAddContact">Add Contact</button>
<script>
var contactManager = {
"contacts" : [
<html>
<head>
<title>JS Arrays</title>
</head>
<body>
<button id="btnAddContact">Add Contact</button>
<script>
// create a circle object
var circle = {