Skip to content

Instantly share code, notes, and snippets.

View ivanlynch's full-sized avatar
🏠
Working from home

Ivan Lynch ivanlynch

🏠
Working from home
View GitHub Profile
@ivanlynch
ivanlynch / renameReactJsToJsx.sh
Created September 18, 2024 13:35 — forked from parties/renameReactJsToJsx.sh
rename all *.js files containing React markup to *.jsx
# finds all *.js files that have either `</` or `/>` tags in them and renames them to *.jsx
find ./src -type f -name '*.js' -not -name '*.jsx' -not -name '*.ejs' -exec bash -c 'grep -l -E "</|/>" "$0"' {} \; -exec bash -c 'mv "$0" "${0%.js}.jsx"' {} \;
@ivanlynch
ivanlynch / jest-to-vitest.sh
Created September 18, 2024 13:34 — forked from wojtekmaj/jest-to-vitest.sh
Automatically migrate Jest project to Vitest
#!/bin/bash
# Ensure we're working on the latest version of the main branch
git switch main
git fetch
git pull
# Create a new branch
git switch -c vitest
# PUT THIS COMMAND INTO YOUR ~/.bashrc
hgrep () {
history | egrep --color=auto --recursive "$@" | egrep --color=auto --recursive -v "hgrep $@"
}
@ivanlynch
ivanlynch / init.vim
Last active August 12, 2022 01:29
Vim configuration
set clipboard=unnamed
set ruler
set shiftwidth=2
set mouse=a
set cursorline
set number
"set completeopt=menu,noinsert
set encoding=utf-8
"set hidden
"set nobackup
@ivanlynch
ivanlynch / index.html
Last active September 9, 2020 15:20
Digital PAD
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script id="sap-ui-bootstrap"
type="text/javascript"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"></script>
@ivanlynch
ivanlynch / network_security_config.xml
Created September 1, 2020 17:02
Android Security
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system"/>
</trust-anchors>
</base-config>
</network-security-config>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">