Skip to content

Instantly share code, notes, and snippets.

View nataliemarleny's full-sized avatar
🧠
Thinking about thinking

Natalie Marleny nataliemarleny

🧠
Thinking about thinking
View GitHub Profile
@nataliemarleny
nataliemarleny / open-chrome-sans-CORS.sh
Created December 2, 2019 19:17
⭐️ Open Chrome with disabled CORS
open -na Google\ Chrome --args --user-data-dir= --disable-web-security --disable-site-isolation-trials
@nataliemarleny
nataliemarleny / sort-by-size.sh
Created September 1, 2019 18:13
Script which sorts directories by size
du -h -d1 | sort -h
@nataliemarleny
nataliemarleny / next.api.md
Created July 20, 2019 20:13
POC - packages/next/temp/next.api.md

API Report File for "next"

Do not edit this file. It is a report generated by API Extractor.

import next from 'next/dist/server/next';
import { NextApiRequest } from 'next-server/dist/lib/utils';
import { NextApiResponse } from 'next-server/dist/lib/utils';
import { NextComponentType } from 'next-server/dist/lib/utils';
@nataliemarleny
nataliemarleny / md-to-html.sh
Last active July 20, 2019 18:16
Convert markdown files from a directory, into a directory of html files
#!/usr/bin/env bash
set -eu -o pipefail
markdown_dir="${1:-markdown}"
html_dir="${2:-html}"
MARKED_EXEC="${MARKED_EXEC:-yarn exec marked}"
sanitise() {
cat | sed 's#\.md#.html#g'
}
@nataliemarleny
nataliemarleny / tasksError.md
Last active July 20, 2019 12:19
tasks.json
@nataliemarleny
nataliemarleny / nextjs-link-documentation.md
Last active July 17, 2019 20:40
Notes on Issue #7941 for Next.js
@nataliemarleny
nataliemarleny / hipster_graphql.js
Created July 7, 2019 12:09
ES6 object syntax (implicit object properties)
// Reduced
const obj1 = {
fun1() {}
}
const obj1 = {
fun1: () => {}
}
// this
@nataliemarleny
nataliemarleny / sum.test.js
Created May 13, 2019 07:35
Initial unit test - jest setup
const sum = require('./sum');
test('adds 1 + 2 to equal 3', () => {
expect(sum(1, 2)).toBe(3);
});
@nataliemarleny
nataliemarleny / sum.js
Created May 13, 2019 07:34
Jest setup - initial file
function sum(a, b) {
return a + b;
}
module.exports = sum;
@nataliemarleny
nataliemarleny / package.json
Created May 12, 2019 18:00
Add this to scripts in package.json when initialising Jest in a project
{
"scripts": {
"test": "jest"
}
}