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 / JSON_Explorer.tsx
Created September 26, 2018 21:59
JSON_Explorer
import * as React from "react";
import { PropertyControls, ControlType } from "framer";
import * as jp from "./jsonpath.js";
const style: React.CSSProperties = {
height: "100%",
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@nataliemarleny
nataliemarleny / ASCII-map.md
Last active December 5, 2018 22:44
ASCII map formula
'STRING'.split('').map(c => c.charCodeAt()

// decodes string and gives ASCII values

// useful when you want to know which ASCII values a string is made of for debugging 
@nataliemarleny
nataliemarleny / obj-assignment-and-copying.md
Created December 10, 2018 22:02
Object Assignment and Copying Proof in Javascript
> o1 = { b: 'c' }
{ b: 'c' }
> o2 = o1
{ b: 'c' }
> o3 = { ...o1 }
{ b: 'c' }
> o1 === o2
true
> o1 === o3
@nataliemarleny
nataliemarleny / .gitconfig
Last active October 19, 2021 09:50
Niche git commands which I won't remember aliases for
[user]
name = <ur-name>
email = <ur-email>
[core]
editor = vim -f
excludesfile = /Users/<name-of-mac>/.gitignore_global
[color]
ui = true
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' --abbrev-commit
@nataliemarleny
nataliemarleny / injecting-mocks-into-functions-example
Created January 4, 2019 22:00
Injecting Mocks into Functions Example
import * as module from 'module';
jest.mock('service-making-a-http-request', () =>
Object.assign(require.requireActual('service-making-a-http-request'), {
externalService: {
execute: jest
.fn()
// function - 'test label' data
.mockResolvedValueOnce({
body: {
@nataliemarleny
nataliemarleny / cross-add
Created January 15, 2019 17:18
cross-add
function crossAdd(input) {
let answer = [];
for (let i = 0; i < input.length; i += 1) {
let goingUp = input[i];
let goingDown = input(input.length-1-i];
answer.push(goingUp + goingDown);
}
return answer;
}
@nataliemarleny
nataliemarleny / resetHard.rc
Created February 12, 2019 14:08
resetHard
yarn pm2 kill
git clean -fxd
yarn
yarn dev
@nataliemarleny
nataliemarleny / itemScope-is-a-boolean.js
Last active April 7, 2019 09:34
itemScope is a boolean 🙃
// Steps to reproduce funky itemScope rendering behaviour:
```sh
npm init -y
npm i --save react react-dom
npm i --save-dev react-scripts
mkdir -p public
cat <<"EOF" > public/index.html
<html>
@nataliemarleny
nataliemarleny / vscode.json
Created March 26, 2019 17:50
VSCode_preferences.json
{
"editor.renderWhitespace": "boundary",
"workbench.colorTheme": "Default High Contrast",
"workbench.editor.tabSizing": "shrink",
"window.zoomLevel": 1,
"explorer.confirmDragAndDrop": false,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"workbench.sideBar.location": "right",