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 / Fetch-and-reset-latest-changes-in-multiple-repositories.sh
Last active January 8, 2021 12:18
Fetch and reset latest changes in multiple repositories
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 July 11, 2020 10:22
Generalised structured var dump for php
function structured_var_dump($arr) {
return '<pre>' . var_export($arr, true) . '</pre>';
}
@nataliemarleny
nataliemarleny / structured_var_dump.php
Created July 11, 2020 10:20
Generalised structured var dump for php
function structured_var_dump($arr) {
return '<pre>' . var_export($arr, true) . '</pre>';
}
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 June 1, 2020 12:53
Read input text file for completing algos (Node.js)
const fs = require('fs');
const input = fs.readFileSync(0).toString();
@nataliemarleny
nataliemarleny / bisect.sh
Created December 9, 2019 17:18
Predicate Script for git bisect
#!/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 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 / settings.json
Last active May 22, 2020 10:01
[WIP] VSCode 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 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';