Skip to content

Instantly share code, notes, and snippets.

View phillipadsmith's full-sized avatar

Phillip Smith phillipadsmith

View GitHub Profile
@harlo
harlo / auto_jekyll.sh
Last active August 29, 2015 14:00
automatic jekyll posts!
#! /bin/bash
BLOG_DIR=/where/is/your/jekyll/blog
ASSETS_DIR=$BLOG_DIR/subpath/for/your/assets/like/images/or/whatever
function join { local IFS="$1"; shift; echo "$*"; }
MAKE_TITULAR_DIR=false
if [ $# -eq 0 ]
then
TITLE="new_post"
@adamretter
adamretter / schedule.csvs
Created July 15, 2014 08:59
CSV Schema for csvconf.com/schedule.csv
version 1.0
@totalColumns 4
Time: regex("(([0-1][0-9])|(2[0-3])):[0-5][0-9] - (([0-1][0-9])|(2[0-3])):[0-5][0-9]")
Galeria: notEmpty
"Room 1":
"Room 2":
/*
CSV Schema for http://csvconf.com/schedule.csv
*/
@jberger
jberger / leaderboard.pl
Last active August 29, 2015 14:05
A golf leaderboard websocket app
#!/usr/bin/env perl
use Mojolicious::Lite;
use Mango;
use Mojo::IOLoop;
use DDP;
use feature 'current_sub';
plugin 'Config' => {
file => 'leaderboard.conf',
@phillipadsmith
phillipadsmith / gist:965479
Created May 10, 2011 22:08
Tyee API: Example story object with many of the likely properties
{
"hits" : {
"hits" : [
{
"_source" : {
"textWithHtml" : "<p>...</p>",
"section" : "News",
"contribs" : [
"182261"
@cphilippsen
cphilippsen / acf_relationship_fields
Created April 8, 2012 15:48
ACF Relationship get related posts fields content
<?php if(get_field('relationship')): ?>
<h2>Related posts</h2>
<ul id="portfolio-grid">
<?php foreach(get_field('relationship') as $related): ?>
<li>
<a href="<?php echo get_permalink($related->ID); ?>" title="<?php echo get_the_title($related->ID) ?>">
<img src="<?php the_field('image_src', $related->ID); ?>" alt="" /> <span class="caption"><?php the_field('image_caption', $related->ID); ?></span>
</a>
</li>
@dannygarcia
dannygarcia / grunt.js
Created September 20, 2012 02:39
Sample grunt-jekyll grunt.js
// Sample grunt-jekyll grunt.js file
// https://github.com/dannygarcia/grunt-jekyll
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jekyll: {
package Mojolicious::Plugin::Pipeline::CSSCompressor;
use Mojo::Base 'Mojolicious::Plugin';
use CSS::Compressor 'css_compress';
sub register {
my ($self, $app) = @_;
# Register "css_compressor" filter
$app->filter(css_compressor => sub { css_compress shift });
require 'sinatra'
require 'sanitize'
TO_REMOVE = ["", " ", "&nbsp;"]
get '/' do
<<-HTML
<form method="post" action="sanitize">
<textarea name="dirty" style="width:100%;height:800px;"></textarea>
<input type="submit" value="Submit">
@afragen
afragen / iOS-aspect-ratio.css
Created May 21, 2013 23:45
iOS media queries - device aspect ratio
/*Another useful media feature is device-aspect-ratio.*/
/*Note that the iPhone 5 does not have a 16:9 aspect ratio. It is in fact 40:71.*/
/*iPhone < 5:*/
@media screen and (device-aspect-ratio: 2/3) {}
/*iPhone 5:*/
@media screen and (device-aspect-ratio: 40/71) {}

ProPublica News Applications Fellow

We’re looking for the next great News Applications Fellow to work with ProPublica’s world-class news applications desk.

To give you a sense of the work you’ll be doing, here are examples of what your predecessors have done: Our first Fellow built our Nursing Home Inspect app as well as the Pipeline Tracker, which is as far as we know the first news application and reported story that share a single byline. The second Fellow helped build Free the Files, one of the most ambitious journalistic crowdsourcing projects ever, and completely revamped our hugely popular [Dollars