Skip to content

Instantly share code, notes, and snippets.

Avatar
🧠
Thinking about thinking

Natalie Marleny nataliemarleny

🧠
Thinking about thinking
View GitHub Profile
@nataliemarleny
nataliemarleny / Fetch-and-reset-latest-changes-in-multiple-repositories.sh
Last active Jan 8, 2021
Fetch and reset latest changes in multiple repositories
View Fetch-and-reset-latest-changes-in-multiple-repositories.sh
for f in $(ls); do
cd $f && git fetch --prune origin && git reset --hard origin/$main_branch_name && cd -;
done
@nataliemarleny
nataliemarleny / structured_var_dump.php
Last active Jul 11, 2020
Generalised structured var dump for php
View structured_var_dump.php
function structured_var_dump($arr) {
return '<pre>' . var_export($arr, true) . '</pre>';
}
@nataliemarleny
nataliemarleny / structured_var_dump.php
Created Jul 11, 2020
Generalised structured var dump for php
View structured_var_dump.php
function structured_var_dump($arr) {
return '<pre>' . var_export($arr, true) . '</pre>';
}
View memoization-example.js
const fs = require("fs");
// "4\n1\n2\n5\n3"
const input = fs.readFileSync(0).toString();
// [4, 1, 2, 5, 3]
const lines = input.split("\n").map((n) => parseInt(n, 10));
const T = parseInt(lines[0], 10);
@nataliemarleny
nataliemarleny / parseAlgos.js
Created Jun 1, 2020
Read input text file for completing algos (Node.js)
View parseAlgos.js
const fs = require('fs');
const input = fs.readFileSync(0).toString();
@nataliemarleny
nataliemarleny / bisect.sh
Created Dec 9, 2019
Predicate Script for git bisect
View bisect.sh
#!/usr/bin/env bash
git clean -fxd
cd <package-name>
yarn
2>&1 yarn lint | grep -vq error
@nataliemarleny
nataliemarleny / open-chrome-sans-CORS.sh
Created Dec 2, 2019
⭐️ Open Chrome with disabled CORS
View open-chrome-sans-CORS.sh
open -na Google\ Chrome --args --user-data-dir= --disable-web-security --disable-site-isolation-trials
@nataliemarleny
nataliemarleny / sort-by-size.sh
Created Sep 1, 2019
Script which sorts directories by size
View sort-by-size.sh
du -h -d1 | sort -h
@nataliemarleny
nataliemarleny / settings.json
Last active May 22, 2020
[WIP] VSCode Settings.json
View settings.json
{
"editor.renderWhitespace": "boundary",
"workbench.colorTheme": "Framer Syntax",
"workbench.editor.tabSizing": "shrink",
"window.zoomLevel": 3,
"explorer.confirmDragAndDrop": false,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"workbench.sideBar.location": "right",
"editor.tabSize": 2,
@nataliemarleny
nataliemarleny / next.api.md
Created Jul 20, 2019
POC - packages/next/temp/next.api.md
View 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';