Skip to content

Instantly share code, notes, and snippets.

View Tim-Machine's full-sized avatar

Tim Smith Tim-Machine

  • Cohezion.ai
  • Cary,NC
  • 11:53 (UTC -04:00)
View GitHub Profile
Dear Y'all (or 'you all' depending on the geographic origin of your email),
I'm on vacation. If things are going well, my feet are likely kicked up near a pool while my kids are quietly behaving.
I do apologize for being out of pocket, but given that my last auto-reply email was written when my Daughter, Blahdita, was born (### months ago), I feel fairly justified to take this week off.
If you need immediate attention, please stop, take a deep breath, and consider whether you REALLY need immediate attention or not. If you do, please consider it a third time. I'm confident you'll realize that it can wait.
IF you do need immediate attention beyond these three checks, you can email Blah McBlah (blahn@blahblah.com) and he'll do his best to reply as quickly as possible.
<?php
$webRoot = $_SERVER['DOCUMENT_ROOT']; // root of our web site.
define("DS", DIRECTORY_SEPARATOR ); // this is to account for OS direcorty separator differences
require_once $webroot.DS."this{$DS}is{$DS}a{$DS}path{$DS}to{$DS}a{$DS}folder";
public function submit_entry()
{
$this->initialize();
// Get hidden meta vars
if ( ! isset($_POST['meta']))
{
// This should never be valid
return;
}
<!--
Example URL
www.mysite.com/templategroup/subtemplate/segment3
-->
{exp:channel:entries channel="SnactivityDetailsChannel" limit="1" url_title="{segment_3}" }
<h2>{title}</h2>
{if no_results}
@Tim-Machine
Tim-Machine / example.php
Created May 30, 2013 19:28
example of non working blade/theme/controller layout configuration If you remove sidebar content works. If sidebar is there "variable 'content' cant be found"
<?php
class ExampleController extends BaseController{
protected $layout = "master.layout"
protected $themePath = "/some/path/"
funcion index()
{
$data['user'] = "some user"
View::addNamespace('theme', $this->themePath);
@Tim-Machine
Tim-Machine / robot.js
Created December 11, 2012 20:04
DeathAng3l2
// Conventions:
// We use angles in degrees in clock-wise fashion
RobotHelpers = {};
MathHelpers = {};
RobotHelpers.cannon_rotation_direction = {};
RobotHelpers.shoot = {};
RobotHelpers.target = {};
RobotHelpers.moving_direction = {};
@Tim-Machine
Tim-Machine / less.css
Created November 10, 2012 15:54
less examples
<!-- ugly bootstrap classes in your html -->
<div class="row">
<div class="span6">...</div>
<div class="span6">...</div>
</div>
<!- our new, semanticized HTML -->
<article>
<section class="main">...</section>
@Tim-Machine
Tim-Machine / gist:3975994
Created October 29, 2012 19:36
possible parser / template engine
<div id="blogroll" data-type='blog' data-limit="6" data-sortBy="date" data-order="DESC">
<div class="title">{{title}}</div>
<div class="date">{{date :format[m-d-y]}}</div>
<div class="author">{{author}}</div>
<div class="entry">{{entry}}</div>
</div>
oil generate admin controller1
# works fine no issues
oil generate admin controller2
#failes ./././././base.php already exists, use -f, or --force to override.
#I don't want to override the base.php
<!--- LEFT NAVIGATION W/ THUMBNAILS --->
<div class="leftnav">
<div class="addViews">
<h3 class="optima"> additional views </h3>
<img src="${ms.urlPathNoProtocol}/imagesnew/product/alt/altBracketTop.png" alt="top" />