Skip to content

Instantly share code, notes, and snippets.

View Ethan-Arrowood's full-sized avatar
🐶

Ethan Arrowood Ethan-Arrowood

🐶
View GitHub Profile
@mcollina
mcollina / tap-15.sh
Last active April 6, 2021 08:24
Remove all tap@15 deprecations
#!/bin/sh
find ./test -regex '.*js' | xargs sed -I '' 's/tearDown/teardown/g'
find ./test -regex '.*js' | xargs sed -I '' 's/strictEqual/equal/g'
find ./test -regex '.*js' | xargs sed -I '' 's/deepEqual/same/g'
find ./test -regex '.*js' | xargs sed -I '' 's/false(/notOk(/g'
find ./test -regex '.*js' | xargs sed -I '' 's/notStrictEqual/not/g'
find ./test -regex '.*js' | xargs sed -I '' 's/similar/match/g'
find ./test -regex '.*js' | xargs sed -I '' 's/strictDeepEqual/strictSame/g'
find ./test -regex '.*js' | xargs sed -I '' 's/is(/equal(/g'
find ./test -regex '.*js' | xargs sed -I '' 's/throw(/throws(/g'
const React = {};
/**
* ReactElements are lightweight objects which contain information necessary to
* create the equivalent DOM nodes. All JSX tags are transformed into functions
* that return instances of this class.
* Note that the decision to actual create those nodes and insert them into the
* document hasn't been made yet: it is possible that that might never happen.
*/
@pascaldekloe
pascaldekloe / utf8.js
Last active September 9, 2023 05:21
JavaScript UTF-8 encoding and decoding with TypedArray
// This is free and unencumbered software released into the public domain.
// Marshals a string to an Uint8Array.
function encodeUTF8(s) {
var i = 0, bytes = new Uint8Array(s.length * 4);
for (var ci = 0; ci != s.length; ci++) {
var c = s.charCodeAt(ci);
if (c < 128) {
bytes[i++] = c;
continue;
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 23, 2024 19:59
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname