Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
e'rry day I'm hustlin'

Ændrew Rininsland aendrew

:shipit:
e'rry day I'm hustlin'
View GitHub Profile
@aendrew
aendrew / nginx
Last active Jan 25, 2018 — forked from khelll/nginx
A start / stop script for Nginx on Amazon Linux
View nginx
#!/bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: nginx initscript
# Description: nginx
### END INIT INF
@aendrew
aendrew / frame.html
Created Oct 12, 2016 — forked from bclinkinbeard/frame.html
D3 listener collisions across iframes
View frame.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
circle {
fill: green;
}
@aendrew
aendrew / .block
Last active Oct 11, 2016 — forked from vijithassar/README.md
one-line arrow function syntax for getter/setter methods
View .block
license: mit
@aendrew
aendrew / rfc-date-to-iso-date.xsl
Last active Nov 10, 2015 — forked from bzerangue/rfc-date-to-iso-date.xsl
[XSLT] Convert RFC 2822 format to ISO date format
View rfc-date-to-iso-date.xsl
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Name: RSS feed date format to ISO 8601
Version: 1.0
Author: Ændrew Rininsland <aendrew.rininsland@thetimes.co.uk>
Based on work by: Brian Zerangue <brian.zerangue@gmail.com>
URL: https://gist.github.com/aendrew/eaa220e619008cbb628c
N.b., currently the timezone handling is a bit screwy.
View gist:4684487
function (currSlideElement, nextSlideElement, options, forwardFlag){
$(currSlideElement).children('.views-field-title').slideUp();
$(currSlideElement).children('.views-field-field-homepage-slider-text').slideUp();
}
View slideshow.js
$('.view-homepage-slider').cycle({
fx: 'fade',
speed: 'slow',
timeout: 0,
before: onBefore,
after: onAfter,
});
function onBefore(curr, next, opts){
@aendrew
aendrew / csv-to-jsonp.php
Created Apr 27, 2012 — forked from robflaherty/csv-to-json.php
Convert CSV to JSONP
View csv-to-jsonp.php
<?php
/*
* Converts CSV to JSONP by Ændrew Rininsland
* Gratuitous fork of "Converts CSV to JSON" by Rob Flaherty
* -- See: http://www.ravelrumba.com/blog/json-google-spreadsheets/
* Example uses Google Spreadsheet CSV feed
*/
header('Content-type: script/javascript');
You can’t perform that action at this time.