Skip to content

Instantly share code, notes, and snippets.

View endocrimes's full-sized avatar

Danielle endocrimes

View GitHub Profile

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

<?php
header(‘Content-Type: application/json’);
$feed = new DOMDocument();
$feed->load(‘path/to/rss.rss’);
$json = array();
$json[‘title’] = $feed->getElementsByTagName(‘channel’)->item(0)->getElementsByTagName(‘title’)->item(0)->firstChild->nodeValue;
$json[‘description’] = $feed->getElementsByTagName(‘channel’)->item(0)->getElementsByTagName(‘description’)->item(0)->firstChild->nodeValue;
$json[‘link’] = $feed->getElementsByTagName(‘channel’)->item(0)->getElementsByTagName(‘link’)->item(0)->firstChild->nodeValue;
$items = $feed->getElementsByTagName(‘channel’)->item(0)->getElementsByTagName(‘item’);
$json[‘item’] = array();
<script type="text/javascript">
(function () {
var Tickr = {
run: function (opts) {
var el = opts.el;
if(!el) return;
var start = Date.now(), delta;
var target = opts.target;
var duration = opts.duration;
var outputType = (el.nodeName.toLowerCase() === 'input') ? 'value' : 'innerHTML';
@endocrimes
endocrimes / responsive.html
Created December 11, 2012 19:32 — forked from lensco/responsive.html
Simple responsive design test page. More info here: http://bricss.net/post/16538278376/simple-responsive-design-test-page
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }
@endocrimes
endocrimes / robot.js
Created December 3, 2012 17:17
ROBOMOTO
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
@endocrimes
endocrimes / flare.json
Created November 27, 2012 17:28
Craig Reville New D3 JSON Format Force Graph with Pan And Zoom
[
{
"name": "Hotel Amfora",
"cluster": 4,
"supplier": "ADRIATICA",
"size": 24.61060620890301
},
{
"name": "Hotel Sol Garden Istra",
"cluster": 4,
@endocrimes
endocrimes / Index.html
Created November 25, 2012 21:15
Clustered Force Layout + Custom Gravity with Pan & Zoom, importing a Json file & Canvas boundaries
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Data-Driven Documents</title>
<link rel="stylesheet" href="main.css">
<script src="http://d3js.org/d3.v3.min.js"></script>
@endocrimes
endocrimes / flare.json
Created November 25, 2012 19:04
D3 Stuff for Craig Reville
{
"name": "Products",
"children": [
{
"name": "Cluster1",
"children": [
{
"name": "Supplier: OHG",
"children": [
{
@endocrimes
endocrimes / flare.json
Created November 23, 2012 17:01
Clustered Force Layout + Custom Gravity with Pan & Zoom, importing a Json file
{
"name": "Products",
"children": [
{
"name": "Cluster1",
"children": [
{
"name": "Supplier: OHG",
"children": [
{
@endocrimes
endocrimes / flare.json
Created November 22, 2012 18:38
Clustered Force Layout + Custom Gravity with Pan & Zoom, importing a Json file
{
"name": "Products",
"children": [
{
"name": "Cluster 1",
"children": [
{
"name": "Supplier: OHG",
"children": [
{