Skip to content

Instantly share code, notes, and snippets.

View jonsherrard's full-sized avatar
💭
Working

Jon Sherrard jonsherrard

💭
Working
View GitHub Profile
@jonsherrard
jonsherrard / cc.md
Last active September 12, 2016 19:05

Writing a 'project setup script' in PHP

For the test we'd like you to write a command-line tool that sets up a new, modern, PHP project.

Use PHP to execute commands in the user's shell.

The API should look something like, if not exactly:

php ~/scripts/create-project.php [project-name]

@jonsherrard
jonsherrard / index.html
Created September 2, 2016 13:54
wzvmbK
<!DOCTYPE html><html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> <head>
<meta name="format-detection" content="date=no">
<meta name="format-detection" content="telephone=no">
<!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]-->
<title>Emerald Street</title>
<style><!--
.ExternalClass p{ MARGIN: 0px; }
@media only screen and (max-width: 480px) {
/* mobile-specific CSS styles go here */
body { padding: 0px !important; margin: 0px !important; min-width: 100% !important; }
// Initial state of array
$descriptions = array(
array(
'author' => 'josh',
'bio' => 'Donec vel iaculis urna. Sed.'
),
array(
'author' => 'sarah',
'bio' => 'Vestibulum eu consectetur ex. Aliquam.'
),
{
"id":1309,
"date":"2016-05-24T23:46:30",
"date_gmt":"2016-05-24T23:46:30",
"guid":{
"rendered":"http:\/\/local.theinterwhat.com\/news\/generated-article-from-rapocalypseporn-1464133590"
},
"modified":"2016-05-26T11:48:17",
"modified_gmt":"2016-05-26T11:48:17",
"slug":"scenes-of-an-apocalyptic-nature",
Verifying that +jpshez is my blockchain ID. https://onename.com/jpshez
@jonsherrard
jonsherrard / jsx-style.jsx
Last active October 8, 2015 15:20
How do you format your component props?
// 1
<Modal
isOpen={this.state.showTermsModal}
onRequestClose={this._toggleTerms}
style={this._customStyles}
/>
// 2

Choosing a new GitHub organisation name

Needs:

  • Short
  • Easy to say
  • Not be taken
  • Sound "cool" / Could be a team name

Options:

@jonsherrard
jonsherrard / component.js
Created September 23, 2015 12:03
An example ES6 React component
import React, { Component } from 'react'
export default class MyComponent extends Component {
render() {
return (
<div>
<h1>This is my Component</h1>
</div>
)
}
This file has been truncated, but you can view the full file.
{"status":"ok","count":1249,"count_total":1249,"pages":1,"posts":[{"id":14989,"type":"map","slug":"the-avalon","url":"http:\/\/emeraldstreet.lab.shortlistmedia.co.uk\/map\/the-avalon","status":"publish","title":"The Avalon","title_plain":"The Avalon","content":"<p class=\"p1\"><span class=\"s1\">The huge dining room at this friendly gastropub is bested by the equally huge back terrace, with its separate spots for drinking, dining and letting the little ones run free \u2013 visit soon before summertime disappears fully. A popular place with a pleasant, suburban feel (read: big portions, families, no central London rushing), Sunday roasts give way to midweek burgers and pints. The starters shine: smoked trout rillettes with dill deftness; blackened red mullet with a generous tapenade-meets-gazpacho dressing. Big flavour hits and a good, inexpensive wine list make this perfect for large groups or a casual couples\u2019 night out.<\/span><\/p>\n","excerpt":"<p>The huge dining room at this friendly gastropub is b
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta content="initial-scale=1.0, maximum-scale=2.0" name="viewport">
<meta content="Clock Limited - www.clock.co.uk" name="creator">
<meta content="B6CB8B64033162E922D724D46307B297" name="msvalidate.01">
<meta content=
"ShortList - Films, Style, Gaming, Sport, TV, Design, Music, Food" name=