Skip to content

Instantly share code, notes, and snippets.

@sixman9
sixman9 / createTSTestProj.sh
Created June 11, 2024 11:26
A bash script to create a JEST-based NodeJS Typescript project for testing out new code fragments
#!/bin/bash
# Function to prompt for a directory name if not provided
prompt_directory_name() {
read -p "Enter the project directory name: " dir_name
if [ -z "$dir_name" ]; then
echo "Directory name cannot be empty. Please try again."
prompt_directory_name
fi
}
@sixman9
sixman9 / createMonorepo.sh
Last active April 14, 2024 14:19
PNPM and Turbo-based Monorepo Bash script, with starter Cloudflare application
#!/bin/bash
# Check if jq is installed, if not, install it
if ! command -v jq &> /dev/null
then
echo "jq could not be found, installing..."
sudo apt-get install jq -y || sudo yum install jq -y || brew install jq
fi
# Check if pnpm is installed, if not, install it
@sixman9
sixman9 / cfTunnel.sh
Created May 25, 2023 00:08
Cloudflare Tunnel to local HTTP creation as a Bash Script
#!/bin/bash
# Let's ease Cloudflare Tunnel to local HTTP creation
# See also https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/
# Check if cloudflared is installed
if ! command -v cloudflared &> /dev/null; then
echo "'cloudflared' is not installed. Installing it now..."
brew install cloudflare/cloudflare/cloudflared
else
@sixman9
sixman9 / idevicerestore.sh
Last active January 9, 2023 16:34 — forked from stek29/idevicerestore.sh
idevicerestore on linux (Debian-based)
sudo apt update
# sudo apt upgrade
sudo apt install -y libcurl4-openssl-dev libplist-dev libzip-dev openssl libssl-dev libusb-1.0-0-dev libreadline-dev build-essential git make automake libtool pkg-config libssl-dev libimobiledevice-dev libgpod-common libgpod-dev libcurl3-gnutls libcurl4 libcurl4-openssl-dev
git clone https://github.com/libimobiledevice/libirecovery
git clone https://github.com/libimobiledevice/idevicerestore
git clone https://github.com/libimobiledevice/usbmuxd
git clone https://github.com/libimobiledevice/libimobiledevice
git clone https://github.com/libimobiledevice/libusbmuxd
git clone https://github.com/libimobiledevice/libplist
@sixman9
sixman9 / genConfigSchemaForEditly.sh
Created March 10, 2022 04:17
Script to create a JSON Schema from a TypeScript interface (Editly.Config)
#!/bin/sh
# Assuming you have NodeJS tools installed...
tsprojname=new-ts-app
# Create a well-configured TypeScript project in direct './"$tsprojname"'
npx tsdx create --template basic "$tsprojname"
pushd ./"$tsprojname"
@sixman9
sixman9 / Pong.java
Created December 11, 2020 04:08
LibGDX Pong simple implementation, University of Idaho (Jeffrey)
/*
* Slightly modified from
* http://www.java-gaming.org/index.php?topic=33022.0 and the
* pastebin link http://pastebin.com/WMFBg3zQ
*
* cache:http://www2.cs.uidaho.edu/~jeffery/courses/328/newPong.java <=**
*/
package com.mygdx.game;
import com.badlogic.gdx.ApplicationListener;
@sixman9
sixman9 / launch.json
Created August 5, 2020 11:59
VSCode Mocha TypeScript debug launch configuration (place in '<project>/.vscode/launch.json')
{
"version": "0.2.0",
"configurations": [
{
"name": "Current TS File",
"type": "node",
"request": "launch",
"args": ["${file}"],
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
"sourceMaps": true,
@sixman9
sixman9 / wrapWebAppInIonic.md
Last active February 3, 2022 21:53
Wrapping a Web app or PWA into an Ionic/Capacitor Mobile or Desktop app

Capacitor—How To Get Five Apps In One time

Use Ionic framework ‘Capacitor’ to write Angular 7 code and create apps for PWA, iOS, Android, MacOS, and Windows in one go.

Jeroen Ouwehand

Nov 11, 2018·3 min read

@sixman9
sixman9 / installExtensions.sh
Created August 13, 2019 17:12
Install extensions in Visual Studio code from the command line
#!/bin/sh
extensionList=(
formulahendry.auto-close-tag
formulahendry.auto-complete-tag
formulahendry.auto-rename-tag
CoenraadS.bracket-pair-colorizer
wmaurer.change-case
Shan.code-settings-sync
streetsidesoftware.code-spell-checker
@sixman9
sixman9 / Bare Android SDK Setup MacOS.md
Last active September 18, 2020 15:34 — forked from srmds/Bare Android SDK Setup MacOS.md
Bare Android sdk setup MacOS