Skip to content

Instantly share code, notes, and snippets.

View ascorbic's full-sized avatar

Matt Kane ascorbic

View GitHub Profile
@ascorbic
ascorbic / StyleSettings.plist
Created February 24, 2014 11:15
Objective-Clean settings
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>kRequireSpaceAfterColon</key>
<false/>
<key>kRequireOpenBraceOnMethodSignatureLine</key>
<true/>
<key>kRequireOpenBraceOnConditionalStatementLine</key>
<true/>
@ascorbic
ascorbic / gist:812387
Created February 5, 2011 11:34
A full example, that should work.
var gotPicture = function(path) {
$('#previewPic').attr('src', path); /*optional */
var params = {foo: 'bar'};
var cookie = localStorage.getItem("Cookie");
if(cookie) {
params['__cookie'] = cookie;
@ascorbic
ascorbic / passengers.json
Created January 28, 2017 19:11
Annual passengers in UK train stations
{
"ABW": 2929472,
"ABE": 214996,
"ACY": 275404,
"ABA": 566904,
"ABD": 3459944,
"AUR": 127312,
"AVY": 38094,
"ABH": 1984,
"AGV": 435478,
Genie&
Music
Playing
STOP -> Stopped
Stopped
PLAY -> Playing
Search
Default*
Search for tracks -> Searching
Searching
@ascorbic
ascorbic / SketchSystems.spec
Last active September 19, 2018 14:17
History&
History&
waffle_bath unsticky a unsticky b
waffle_bath Unvisited
waffle_bath start -> waffle_bath Incomplete
waffle_bath Incomplete
waffle_bath start -> waffle_bath Incomplete
waffle_bath complete A -> waffle_bath CompletedOutcomeA
waffle_bath complete B -> waffle_bath CompletedOutcomeB
@ascorbic
ascorbic / index.html
Created February 20, 2019 07:30
Tiny parcel/React
<body>
<div id="root"></div>
<script src="index.tsx"></script>
</body>
@ascorbic
ascorbic / IconSprite.tsx
Last active January 2, 2020 13:05
IconSprite
import React, { FC, HTMLAttributes } from "react";
interface Props extends HTMLAttributes<SVGSVGElement> {
name: string;
width?: number | string;
height?: number | string;
}
export const IconSprite: FC<Props> = ({
name,
@ascorbic
ascorbic / machine.js
Created February 19, 2020 16:36
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: `inc-build`,
initial: `fetchingEnvironment`,
context: {
refreshBody: null,
},
states: {
fetchingEnvironment: {
invoke: {
@ascorbic
ascorbic / machine.js
Last active March 18, 2020 16:30
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@ascorbic
ascorbic / machine.js
Created April 1, 2020 11:17
Generated by XState Viz: https://xstate.js.org/viz
const noop = async () => {}
const initialize = noop
const customizeSchema = noop
const sourceNodes = noop
const buildSchema = noop
const createPages = noop
const createPagesStatefully = noop
const calculateDirtyQueries = noop
const extractQueries = noop
const runStaticQueries = noop