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 / 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>
)
}

Choosing a new GitHub organisation name

Needs:

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

Options:

@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
Verifying that +jpshez is my blockchain ID. https://onename.com/jpshez
{
"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",
// Initial state of array
$descriptions = array(
array(
'author' => 'josh',
'bio' => 'Donec vel iaculis urna. Sed.'
),
array(
'author' => 'sarah',
'bio' => 'Vestibulum eu consectetur ex. Aliquam.'
),
@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; }
@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 / styles.js
Created October 4, 2016 14:46
Fewtch styling at Shortlist Studio
import { StyleSheet, css } from 'aphrodite/no-important'
export default StyleSheet.create({
base: {
fontFamily: 'Helvetica Neue',
fontSize: '1.1em',
fontWeight: 300,
'-webkit-font-smoothing': 'antialiased'
},
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>NEVER UNDERDRESSED</title>
<span class="preheader" style="display: none !important; visibility: hidden; font-size: 0; max-height: 0; line-height: 0; margin: 0; mso-hide: all">A Never Underdressed email</span>
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color: #FFFFFF; font-family: Arial, Helvetica, sans-serif" id="wrapper">
<tbody>
<tr>
<td height="30" class="spacer"></td>
</tr>
<tr>
<td>