Skip to content

Instantly share code, notes, and snippets.

@markfknight
markfknight / jekyll_monokai_pygments.css
Created March 28, 2014 00:37
Jekyll Monokai Pygments for GitHub Pages
/* Adjusted to give override background and text colour */
.highlight pre, pre, .highlight .hll {
background-color: #49483E;
border: 1px solid #ccc;
padding: 6px 10px;
border-radius: 3px;
color: #FFFFFF;
}
/* Highlights taken from https://gist.github.com/asaaki/1007420 for Monokai theme */
.c { color: #75715e } /* Comment */
@font-face {
font-family: 'Graublau Web';
src: url('GraublauWeb.eot?') format('eot'), url('GraublauWeb.woff') format('woff'), url('GraublauWeb.ttf') format('truetype');
}
@markfknight
markfknight / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@markfknight
markfknight / launch.json
Last active February 4, 2017 14:52
VSCode launch.json for angular-cli debugging in Chrome
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Chrome against localhost",
"type": "chrome",
"request": "launch",
"url": "http://localhost:4200",
"webRoot": "${workspaceRoot}",
"userDataDir": "${workspaceRoot}/.vscode/chrome/",
@markfknight
markfknight / keybase.md
Created August 13, 2019 22:41
Keybase Proof

Keybase proof

I hereby claim:

  • I am markfknight on github.
  • I am markfknight (https://keybase.io/markfknight) on keybase.
  • I have a public key ASA_aAmdf2xYD1MYosH4n8fCOFRZiAVF1TQEB7AYYbBVVQo

To claim this, I am signing this object:

import { useEffect, useState } from 'react';
function useTracking(page = '') {
const [pageName, setPageName] = useState(page);
useEffect(() => {
const track = (pageName: string): NodeJS.Timeout | null => {
let timeout: NodeJS.Timeout | null = null;
if ((window as any).analytics && pageName) {