Skip to content

Instantly share code, notes, and snippets.

View craigmccoy's full-sized avatar

Craig McCoy craigmccoy

View GitHub Profile
@craigmccoy
craigmccoy / myservice
Created May 5, 2016 14:08 — forked from bramus/myservice
Running a PHP script as a service/daemon using `start-stop-daemon`
#! /bin/sh
# Installation
# - Move this to /etc/init.d/myservice
# - chmod +x this
#
# Starting and stopping
# - Start: `service myservice start` or `/etc/init.d/myservice start`
# - Stop: `service myservice stop` or `/etc/init.d/myservice stop`
@craigmccoy
craigmccoy / twitter-entities.js
Created September 3, 2012 19:15 — forked from wadey/twitter-entities.js
JavaScript parser for Tweet Entities
/*
* twitter-entities.js
* This function converts a tweet with "entity" metadata
* from plain text to linkified HTML.
*
* See the documentation here: http://dev.twitter.com/pages/tweet_entities
* Basically, add ?include_entities=true to your timeline call
*
* Copyright 2010, Wade Simmons
* Licensed under the MIT license