Skip to content

Instantly share code, notes, and snippets.

Chip Lay chiplay

Block or report user

Report or block chiplay

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chiplay
chiplay / system.tsx
Last active Apr 25, 2019
Styled-system + Typescript
View system.tsx
import React, { HTMLAttributes } from 'react'; // version 16.4.2
import styled from 'styled-components'; // version 4.0.3
import * as SS from 'styled-system'; // version 3.2.0
import * as CSS from 'csstype';
export interface BaseProps extends HTMLAttributes<HTMLDivElement> {}
export interface BoxProps extends BaseProps,
SS.BgColorProps,
SS.SpaceProps,
View lottie_succession_animation.json
{
"v": "5.1.16",
"fr": 30,
"ip": 0,
"op": 131,
"w": 1920,
"h": 1080,
"nm": "Comp 1",
"ddd": 0,
"assets": [
@chiplay
chiplay / DataExport.json
Created Feb 1, 2018
Data Export Sample
View DataExport.json
This file has been truncated, but you can view the full file.
@chiplay
chiplay / app.js
Created May 14, 2014
Popover Custom Region w/ Bootstrap
View app.js
/**
* Triggers a bootstrap popover with signin/register view
*/
vent.on('app:signin:popover', function ($parentEl, msg, fn) {
$parentEl.append('<div class="popover-region"></div>');
app.addRegions({
popover: {
selector: '.popover-region',
parentEl: $parentEl,
regionType: Marionette.Region.Popover
@chiplay
chiplay / SomeView.js
Created May 14, 2014
Marionette 'Modal' Custom Region w/ Bootstrap
View SomeView.js
vent.trigger('app:modal:show', new PaymentModalView());
@chiplay
chiplay / handler-selectize.js
Created Nov 1, 2013
Backbone.Stickit + Selectize.js Handler
View handler-selectize.js
define([
'jquery',
'backbone',
'underscore',
'backbone.stickit',
'selectize'
],
function ($, Backbone, _) {
@chiplay
chiplay / app.js
Created Oct 24, 2013
RequireJS + Backbone + Marionette + Modules
View app.js
define([
'config',
'underscore',
'backbone',
'marionette',
'vent'
],
function (config, _, Backbone, Marionette, vent) {
@chiplay
chiplay / maybemonad.js
Created Aug 13, 2013
JS Maybe Monad Patter
View maybemonad.js
// from http://osteele.com/posts/2007/12/monads-on-the-cheap-i-the-maybe-monad
var locationCode = ((cartDelivery||{}).Location||{}).Code;
if (locationCode) {
var name = RF.Models.Cart.get('Delivery').Location.Name;
return name;
}
View PHP User Agent Dectection
preg_match('/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex|^$/i', $_SERVER['HTTP_USER_AGENT'], $matches);
if (!$matches) {
$_SERVER['REQUEST_URI_PATH'] = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$segments = explode('/', $_SERVER['REQUEST_URI_PATH']);
}
?>
@chiplay
chiplay / addthisBBInit
Created May 15, 2013
AddThis Backbone Init
View addthisBBInit
initAddThis: function() {
var addthis_config =
{
data_track_clickback: true,
data_ga_property: 'UA-xxxxxxx-x',
data_ga_social : true
};
You can’t perform that action at this time.