Skip to content

Instantly share code, notes, and snippets.

View gpltaylor's full-sized avatar
💭
I may be slow to respond.

Garry Taylor gpltaylor

💭
I may be slow to respond.
  • Fluent Money
  • Lancashire
View GitHub Profile
@gpltaylor
gpltaylor / ShouldSerializeContractResolver.cs
Created September 26, 2015 17:03
Sample ContractResolver that conditionally removes properties from JSON. This can be plumbed into ASP.NET/API
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Linq
{
using AutoMapper;
using Newtonsoft.Json;
@gpltaylor
gpltaylor / FormidableLabs spectacle
Last active October 3, 2016 18:43
How to separate Slides into module files
import React from "react";
import {
Link,
Slide,
Text,
Heading
} from "spectacle";
var MainBody = () => {
return <div>
import React from 'react'
import { Debounce } from 'react-throttle'
var XPos = (props) => {
return <div>
x: {props.x}
</div>
}
var YPos = (props) => {
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[Todo App]">
<script src="//fb.me/react-0.14.3.js"></script>
<script src="//fb.me/react-dom-0.14.3.js"></script>
<script src="https://wzrd.in/standalone/expect@latest"></script>
<script src="https://wzrd.in/standalone/deep-freeze@latest"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.0.5/redux.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-redux/4.0.6/react-redux.js"></script>
import React, { PropTypes } from 'react'
const BEFOREUNLOAD = "beforeunload"; // see: http://stackoverflow.com/questions/39094138/reactjs-event-listener-beforeunload-added-but-not-removed
class NavigationPrompt extends React.Component {
static contextTypes = {
router: PropTypes.object.isRequired
}
static defaultProps = {
when: true
import java.util.ArrayList;
class Person {
private String name;
public Person(String name) {
setName(name);
}
public String getName() {
@gpltaylor
gpltaylor / big-o-notation.ipynb
Created February 8, 2024 17:19 — forked from jonkrohn/big-o-notation.ipynb
big-O-notation.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.