Skip to content

Instantly share code, notes, and snippets.

Testing statuses

Mikael Brevik mikaelbr

Testing statuses
View GitHub Profile
jaredpalmer / MarkdownPage.tsx
Created Feb 17, 2021
Get headers from MDX in Next.js
View MarkdownPage.tsx
import {MDXProvider} from '@mdx-js/react';
import {MDXComponents} from 'components/MDX/MDXComponents';
import {Toc} from 'components/Toc/Toc';
import * as React from 'react';
export interface MarkdownProps<Frontmatter> {
meta: Frontmatter;
children?: React.ReactNode;

Let's Encrypt with nginx + auto renewal

Let's Encrypt is a new, free, automated, and open Certificate Authority.

Find out more out Let's Encrypt, and how you can use in the Let's Encrypt documentation.

This file will guide you through the minimum things you need to set up Let's Encrypt on your nginx webserver.

torgeir / omniscient-with-requestAnimationFrame.js
Last active Aug 29, 2015
Testing omniscient with requestAnimationFrame.
View omniscient-with-requestAnimationFrame.js
var React = require('react'),
component = require('../'),
immstruct = require('immstruct'),
Immutable = require('immutable'),
d3 = require('d3');
var d = React.DOM;
var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0),
h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0),
torgeir / playing-with-js-combinators.js
Last active May 18, 2017
Playing with js combinators.
View playing-with-js-combinators.js
var log = console.log.bind(console);
var arr = [1, 2, undefined, 3];
var unary = (v) => v;
var binary = (first, rest) => [first, rest];
log('unary', unary.apply(null, arr)); // 1
log('binary', binary.apply(null, arr)); // [1, 2]
#-*- coding: UTF-8 -*-
import os, time
import usb.core
import usb.util
import pygtk
import gtk
from sys import exit
geta6 /
Created Sep 27, 2012
response partial content in node.js
# blob : Object from MongoDB
# blob.body: Buffer
# blob.size: length of buffer, substitute for blob.body.length
# blob.type: MIME (Eg. audio/x-wav)
# req : Object from http
# res : Object from http
# _ : Object from underscore
pwenzel /
Created Jun 6, 2012
Git Log to Tab-Delimited CSV File
# Local Dates:
git log --date=local --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.local.tsv.txt
# ISO Dates:
git log --date=iso --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.iso.tsv.txt
lucasfais / gist:1207002
Created Sep 9, 2011
Sublime Text 2 - Useful Shortcuts
View gist:1207002

Sublime Text 2 – Useful Shortcuts (Mac OS X)


⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt