Skip to content

Instantly share code, notes, and snippets.

@SHaTRO
SHaTRO / git-forked-to
Last active July 14, 2021 07:23
BASH script to change "original" upstream clone to newly forked repo
#!/bin/bash
## If you cloned a repository, then forked it and want to change your clone to point to your fork...
## Usage:
## git-forked-to <NEW ORIGIN URL> [<BRANCH>]
##
## <NEW ORIGIN URL> should be your new forked repo URL
## <BRANCH> defaults to "master"
##
## For example: git-forked-to git@github.com:SHaTRO/conveyance.git
@SHaTRO
SHaTRO / install-docker-compose
Last active December 27, 2018 07:21
Bash script to Install docker-compose on Linux
#!/bin/bash
# This may be out of date, check at https://github.com/docker/compose/releases
DOCKER_PROJECT_USER=docker
DOCKER_COMPOSE_REPO=compose
DOCKER_COMPOSE_APIURL=https://api.github.com/repos/${DOCKER_PROJECT_USER}/${DOCKER_COMPOSE_REPO}/releases/latest
DOWNLOAD_VERSION=`curl -is ${DOCKER_COMPOSE_APIURL} | tr '\n' ' ' | sed 's/.*tag_name" *: *"\([0-9.]*\).*/\1/'`
[[ ${DOWNLOAD_VERSION} =~ ^[0-9.][0-9.]*$ ]] || DOWNLOAD_VERSION=
echo $DOWNLOAD_VERSION
@SHaTRO
SHaTRO / cygwin-install-tl
Created March 25, 2017 21:26
Bash script for auto-magical installation of TeXLive on Cygwin 64-bit
#!/bin/bash
###
# This script downloads and installs TeXLive on Cygwin
# In my environment, the full install takes about 3 hours.
#
# No effort is made here to check mirror speeds or properly select a mirror, so improvement there is welcome.
###
## PRIMARY CONFIGURATION ##
@SHaTRO
SHaTRO / .eslintrc.js
Last active October 15, 2019 07:23
Configuring: Typescript + Jest with Code Coverage + ESLint
module.exports = {
env: {
browser: true,
amd: true,
node: true,
jest: true,
},
plugins: [ 'jest' ],
rules: {
'array-bracket-spacing': [ 'error', 'always' ],
@SHaTRO
SHaTRO / node-typescript-fp-setup
Last active September 22, 2024 06:54
Setting up TS (fp-ts, io-ts) Project with NodeJS
##
## Script to setup a Node TS project with Jest, ESLint, and fp-ts/io-ts
##
## If you want to skip SonarQube support do:
## SKIP_SONAR=true node-typescript-fp-setup.sh
##
# tested with npm 10.2.3, Node v20.10.0; 2023-12-02
# tested with npm 10.8.3, Node v22.9.0; 2024-09-21