This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global require */ | |
var source = require('vinyl-source-stream') | |
var buffer = require('vinyl-buffer') | |
var browserify = require('browserify') | |
var watchify = require('watchify') | |
var riotify = require('riotify') | |
var babelify = require('babelify') | |
module.exports = function (gulp, plugins) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<todo> | |
<h3>TODO</h3> | |
<ul> | |
<li each={ item, i in items }>{ item }</li> | |
</ul> | |
<form onsubmit={ handleSubmit }> | |
<input type="text" /> | |
<button>Add #{ items.length + 1 }</button> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './app.tag' | |
riot.mount('#app', 'app') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b { | |
background-color: red; | |
} | |
@media only screen { | |
b { | |
background-color: green; | |
} | |
b[class] { | |
background: linear-gradient( 0deg, rgb(65, 150, 44), rgb(26, 219, 73) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Simple Sparkline using SVG Path and d3.js</title> | |
<script src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
<style> | |
/* tell the SVG path to be a thin blue line without any area fill */ | |
path { | |
stroke: steelblue; | |
stroke-width: 1; | |
fill: none; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Make Vim more useful | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// zip-search-form.tpl | |
<input id="search" /> | |
<ul id="results"></ul> | |
// zip-search-results.tpl | |
// template which generates results being returned to AJAX request | |
// % is the wildcard character in Parsley | |
{{each events as event WHERE event.zip_code LIKE '{get_var.term}%'}} | |
<li> | |
<h2>{{event.title}}</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
// Using jQuery Library | |
$('#salesforce-form').one('submit', function(e) { | |
e.preventDefault(); | |
var $form = $(this); | |
$.ajax({ | |
url: '{{ page.getUrl() }}', | |
type: 'POST', | |
data: $form.serialize(), | |
success: function cb() { |