Skip to content

Instantly share code, notes, and snippets.

View shawnsandy's full-sized avatar

Shawn Sandy shawnsandy

View GitHub Profile
@shawnsandy
shawnsandy / home_cover.html
Created August 4, 2013 16:51
Saimple pico_tpl plugin section
<!--
TODO The TPL description
-->
<section id="cover" class="cover fold">
<div class="container v-align">
<div class="row">
<!-- CLASS -->
<div class="col-4">
<h1 class="mast-header"> {{ meta.title }} </h1>
<p class="fixie default-text"></p>
@shawnsandy
shawnsandy / add_to_config.php
Last active December 21, 2015 09:08
A simple workaround (hack) to customize pico meta values :- * replace /lib/pico.php with this file (pico.php) * add (copy and paste) the code from add_to_config.php to your pico config file * upgrade to the latest version of adv meta values plugin
<?php
//Custom meta values -- customise the meta values
$config['custom_meta_values'] = array(
//page slug keep lower case
'slug' => 'Slug',
//page category
'category' => 'Category',
//page status
'status' => 'Status',
@shawnsandy
shawnsandy / sublime packages
Created June 11, 2014 10:21
sublime packages
{
"installed_packages":
[
"auto-save",
"Autoprefixer",
"Bootstrap 3 Snippets",
"CakePHP (Native)",
"ColorPicker",
"Emmet",
"EsFormatter",
<?php
$string = "hrlle worls fff test i all rightt ..." ;
$pattern = '/ /';
$string1 = preg_replace($pattern, ' ', $string);
//var_dump($string1);
//var_dump (preg_replace($pattern, $string1)) ;
$string_1 = '%FLBROOKSVILLS$SHERRY$ANNE^16047 TAMPA ST^ ?;6360101362078164784=1908196499040=?#! 346048458 E 2509 ECCECC00000?';
$string_2 = '%FLWEEKI^PIERSON$WILLIAM$HOWARD^11195 MARSH WREN AVE^ ?;6360101662592871391=1810197199310=?#! 346143034 E B 1602 ECCECC00000?';
<?php
$string = "hrlle worls fff test i all rightt ..." ;
$pattern = '/ /';
$string1 = preg_replace($pattern, ' ', $string);
//var_dump($string1);
//var_dump (preg_replace($pattern, $string1)) ;
$string_1 = '%FLSPRING HILL^SANDY$SHAWN$JASON^342 GLENN IVY TER^ ?;6360101953079071446=2012197199060=?#! 34608 E B 1507 ECCECC00000?';
$string_2 = '%FLWEEKI^PIERSON$WILLIAM$HOWARD^11195 MARSH WREN AVE^ ?;6360101662592871391=1810197199310=?#! 346143034 E B 1602 ECCECC00000?';
<?php
function _uploadLogo($imageName) {
$path = 'img/employer/logos/';
if (!empty($this->data['VirtualJobFairExhibitor'])) {
if(!move_uploaded_file($this->data['VirtualJobFairExhibitor']['logo']['tmp_name'], $path . $imageName)) {
return false;
}
@shawnsandy
shawnsandy / Material-Design-Button-in-ReactJS-with-Encapsulated-Styles.markdown
Created January 30, 2015 18:04
Material Design Button in ReactJS with Encapsulated Styles
@shawnsandy
shawnsandy / React-JS-ToDo-App.markdown
Created January 30, 2015 18:05
React JS ToDo App

React JS ToDo App

A quick ToDo app using React JS - basically playing with the fact that it works on CodePen.

A Pen by Adam Moore on CodePen.

License.

/**
* Created by studio-mac on 2/16/15.
*/
var gulp = require('gulp');
var source = require('vinyl-source-stream'); // Used to stream bundle for further handling
var browserify = require('browserify');
var watchify = require('watchify');
var reactify = require('reactify');
var gulpif = require('gulp-if');