This Gist goes over setting up a gulp workflow that will:
- watch for any sass changes, then compiles sass source into css
- watch for any changes in the public directory, and trigger live-reload
- serve static content in
public/
<body> | |
<header> | |
<h1>My super duper page</h1> | |
<!-- Header content --> | |
</header> | |
<div role="main"> | |
<!-- Page content --> | |
</div> | |
<aside role="complementary"> | |
<!-- Secondary content --> |
// ---- | |
// Sass (v4.0.0.alpha.1) | |
// Compass (vundefined) | |
// ---- | |
$settings: ( | |
maxWidth: 800px, | |
columns: 12, | |
margin: 15px, | |
breakpoints: ( |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-6"> | |
<h3>Tabs</h3> | |
<!-- tabs --> | |
<div class="tabbable"> | |
<ul class="nav nav-tabs"> | |
<li class="active"><a href="#one" data-toggle="tab">One</a></li> | |
<li><a href="#two" data-toggle="tab">Two</a></li> | |
<li><a href="#twee" data-toggle="tab">Twee</a></li> |
var sort_by = function(field, reverse, primer){ | |
var key = primer ? | |
function(x) {return primer(x[field])} : | |
function(x) {return x[field]}; | |
reverse = !reverse ? 1 : -1; | |
return function (a, b) { | |
return a = key(a), b = key(b), reverse * ((a > b) - (b > a)); |
//BaseModel.php | |
protected function dateStringToCarbon($date, $format = 'm/d/Y') | |
{ | |
if(!$date instanceof Carbon) { | |
$validDate = false; | |
try { | |
$date = Carbon::createFromFormat($format, $date); | |
$validDate = true; | |
} catch(Exception $e) { } |
/*Content originally from CodeSchool's "try jQuery" lesson. http://try.jquery.com/levels/4/challenges/16 */ | |
$(document).ready(function() { | |
/* | |
* this first part fetches the price and multiplies for the number input in the form | |
*/ | |
$("#nights").on("keyup", function() { | |
var nights = +$(this).val(); | |
var dailyPrice = +$(this).closest(".tour").data("daily-price"); | |
$("#total").text(nights * dailyPrice); | |
$("#nights-count").text($(this).val()); |
dstPosto(pt1,pt2,21). | |
dstPosto(pt3,pt4,55). | |
dstPosto(pt5,pt3,30). | |
dstPosto(pt2,pt5,19). | |
dstPosto(pt4,pt2,13). | |
dstPosto(pt1,pt6,28). | |
abstrobot(r1, [pt4, pt5, pt2, pt6, pt5]). | |
abstrobot(r2, [pt1, pt3, pt6]). | |
abstrobot(r3, [pt2, pt5, pt3, pt2, pt6, pt1, pt5]). |
%originally from http://www.cs.toronto.edu/~sheila/384/w11/simple-prolog-examples.html% | |
This is obviously not expected to work with a raw copy and paste... obviously | |
--------------------------- | |
1. Here are some simple clauses. | |
likes(mary,food). | |
likes(mary,wine). | |
likes(john,wine). | |
likes(john,mary). |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script> | |
</head> | |
<body> | |
<h2>Validation Example</h2> |