Skip to content

Instantly share code, notes, and snippets.

View markknol's full-sized avatar
🧪
Doodling around

Mark Knol markknol

🧪
Doodling around
View GitHub Profile
<?php
function gfm($text){
# Extract pre blocks
$extractions = array();
$text = preg_replace_callback('/<pre>.*?<\/pre>/s', function($matches) use (&$extractions){
$match = $matches[0];
$md5 = md5($match);
$extractions[$md5] = $match;
@tong
tong / haxe.svg
Created April 20, 2013 12:16
Haxe logo svg (optimized)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@catseye
catseye / The Swallows.markdown
Created November 3, 2013 12:28
The first chapter of my first novel for NaNoGenMo. This exciting action continues non-stop throughout the next 14 chapters, but the word count is just shy of 50K (only 49,619 words...)

The Swallows

CHAPTER 1

Alice went to the dining room. Alice saw the golden falcon. Bob went to the dining room. Bob saw the golden falcon. Bob saw Alice. Alice picked up the golden falcon. Alice went to the living room. Bob went to the kitchen. Alice went to the dining room. Bob went to the dining room. Bob saw Alice. Bob saw Alice was carrying something. Alice went to the living room. Bob went to the kitchen. Alice went to the dining room. Bob went to the dining room. Bob saw Alice. Bob saw Alice was carrying something. Alice went to the living room. Bob went to the kitchen.

Alice went to the dining room. Bob went to the dining room. Bob saw Alice. Bob saw Alice was carrying something. Alice went to the kitchen. Bob went to the living room. Alice yawned. Bob went to the dining room. Alice went to the dining room. Alice saw Bob. Bob went to the living room. Alice went to the kitchen. Bob went to the dining room. Alice yawned. Bob went to the kitch

@catseye
catseye / The Swallows of Summer.markdown
Created November 3, 2013 19:08
The first four chapters of my second novel for NaNoGenMo. It is a sequel to the first novel. It's three years later, and Alice and Bob live in a much bigger house now, and own more things.

The Swallows of Summer

Chapter 1.

The day was overcast and humid. Alice was in the dining room. Alice saw the golden falcon. Bob was in Bob's bedroom. Alice picked up the golden falcon. Bob went to the upstairs hall. Alice hid the golden falcon in the cabinet. Alice went to the kitchen. Bob went to the front hall. Alice examined the cupboards carefully. Alice went to the front hall. Alice saw Bob. 'Hello, Bob,' said Alice. 'Hello, Alice,' replied Bob. Alice went to the kitchen. Bob went to the kitchen. Bob saw Alice. 'Hello, Alice,' said Bob. 'Hello, Bob,' replied Alice. 'Lovely weather we're having, isn't it?' asked Alice. 'Perhaps, Alice,' replied Bob.

'Oh, I know, I know,' said Alice. Bob nodded. Alice went to the front hall. It was so nice being in the front hall again! Bob examined the cupboards carefully. Bob went to the dining room. Alice went to the living room. Bob went to the kitchen. Alice went to the front hall. Bob went to the d

@pbojinov
pbojinov / README.md
Last active July 23, 2024 00:41
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@:remove
@:autoBuild(SkipSerializeMacro.build())
interface ISkipSerialize {}
@hamaluik
hamaluik / !Profiler.hx
Last active April 6, 2020 23:11
Simple Haxe Profiler
package ;
import haxe.ds.StringMap;
import haxe.macro.Context;
import haxe.macro.Expr;
import haxe.macro.Printer;
import haxe.macro.Type.ClassType;
import neko.Lib;
using haxe.macro.ExprTools;
@kevinresol
kevinresol / AssetPaths.hx
Created August 22, 2015 01:44
Macro to read asset paths
package util;
/**
* ...
* @author Kevin
*/
@:build(util.AssetPathsMacro.build())
class AssetPaths
{
@natevogt
natevogt / gist:8f9e49ec1f4883dc71db
Created September 9, 2015 19:18
Apple keynote 9/9/2015
incredible
incredible
incredible
beautiful
really beautiful
fantastic
amazing
incredible
great
incredible
@spyesx
spyesx / adblock-blacklist.css
Last active February 7, 2024 09:48
Class and ID to avoid because of AdBlock
.sidebar_newsletter_sign_up,
.sidebar_subscribe,
.sign-up-form-single,
.signup-form--header,
.signup-with-checkboxes,
.skinny-sign-up,
.slidedown-newsletter,
.small-newsletter,
.social-link-mail,
.social_newsletter_box,