Skip to content

Instantly share code, notes, and snippets.

@sambgordon
sambgordon / script.js
Last active June 15, 2018 15:36
Use WP rev slider on non-wordpress site
//Revolution Slider parameters
//With jquery-dependent rs-plugin in place, calls necessary elements to run this awesome plugin on whatever site you want.
jQuery(document).ready(function() {
jQuery('.tp-banner').show().revolution(
{
dottedOverlay:"none",
delay:14000,
startwidth:1170,
startheight:720,
anonymous
anonymous / hosting_activerecord.php
Created April 16, 2014 08:30
overwrote Lemonstand Db_ActiveRecord select method
public function select($fields = '*', $table_fields = '', $replace_columns = false)
{
if (strlen($table_fields) != 0)
{
// 1. select(table, fields), append table. to fields
$table = $fields;
$fields = explode(',', $table_fields);
foreach($fields as &$field) {
if (strstr($field, '.') === false) {
$field = $table . '.' . $field;
@EHLOVader
EHLOVader / syntax.php
Last active July 3, 2017 15:58
Syntax highlighting test with HTML PHP and some tricky bits for testing that a highlighter is doing things right.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Text Highlight Demo</title>
<script type="text/javascript">
jQuery(function($,undefined){
var Sublime = {
"theme": "Flatland Dark.sublime-theme",
"color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme",
/* 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; }
@Abban
Abban / WordPress Theme Customizer Sample.php
Created June 21, 2012 21:09
WordPress Theme Customizer Sample
<?php
function themename_customize_register($wp_customize){
$wp_customize->add_section('themename_color_scheme', array(
'title' => __('Color Scheme', 'themename'),
'priority' => 120,
));
// =============================
@aFarkas
aFarkas / sssl.js
Created April 22, 2011 10:18
simple, small script loader
/*!
* SSSL: smallest, simpelst script loader
* version: 1.0.1
*
* API:
* Normal usage
* sssl(source [,complete]);
*
* Example:
* sssl('jquery.js', function(){