Skip to content

Instantly share code, notes, and snippets.

Snippet: [[SnippetName]]
Chunk: [[$ChunkName]]
System Setting: [[++SettingName]]
TV: [[*fieldName/TvName]]
Link tag: [[~PageId? &paramName=`value`]]
Placeholder: [[+PlaceholderName]]
<?php
@cwittyman
cwittyman / demo.html
Last active August 29, 2015 14:06 — forked from dciccale/demo.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Styling radios &amp; checkboxes using CSS3</title>
<link rel="stylesheet" media="screen" href="styles.css" >
</head>
<body>
<h1>Styling radios &amp; checkboxes using CSS3</h1>
mkdir ./gif; for f in *.png; do y=${f%.png}; convert -dispose 3 -delay 0 -deconstruct -loop 0 ./$f -crop 40x40 +repage -depth 4 ./gif/$y.gif; echo "Converting $y to GIF"; echo "—~—~—~—~—~—~—~—~—~—~—~–"; done
# Formatted for readability
SELECT src, src_height, src_width, src_big, src_small, src_small_height, src_small_width
FROM photo
WHERE pid IN (SELECT pid
FROM photo_tag
WHERE subject='124205187693820' )
OR
pid IN (SELECT pid
FROM photo
WHERE aid IN (SELECT aid
@cwittyman
cwittyman / ee-import.php
Last active August 29, 2015 14:00
ee-marker-import
<?php
ee()->load->library('api');
ee()->api->instantiate('channel_entries');
ee()->api->instantiate('channel_fields');
$channel_id = 100;
$site_id = 9;
$fileName = "/path/to/hotels.csv";
/**
* Nest Direct
*
* Author: dianoga7@3dgo.net
* Date: 2013-07-18
*
* Copyright (C) 2013 Brian Steere <dianoga7@3dgo.net>
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy, modify,
@cwittyman
cwittyman / smartthings-presence-pushover-alert.js
Last active December 20, 2015 11:48
Smarthings Presence Pushover Alert
/**
* Who's coming or going?
*
* Author: chasewittdesign@gmail.com
* Date: 2013-07-31
*/
preferences {
section("When a presence sensor arrives or departs this location..") {
input "presence", "capability.presenceSensor", title: "Which sensor?"
}
@cwittyman
cwittyman / smartthings-motion-detect-pushover.js
Last active December 20, 2015 10:30
SmartThings Motion Detector that pushes to Pushover
/**
* Motion Detect - Pushover
*
* Author: cwitty
*/
// Automatically generated. Make future change here.
definition(
name: "Motion Detect",
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
@cwittyman
cwittyman / foundation-4-ie8.css
Last active December 15, 2015 17:19
Foundation 4 IE 8 stylesheet
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }