Skip to content

Instantly share code, notes, and snippets.

@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 / CMakeLists.txt
Created December 14, 2010 10:42
cmake files for Apple IOS development (has C++ lean, can be adapted however)
# See original post at http://stackoverflow.com/questions/822404/how-to-set-up-cmake-to-build-an-app-for-the-iphone
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0015 NEW)
cmake_policy(SET CMP0016 NEW)
project(test)
set(NAME test)
@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 / SQLite Cmake script for win32
Created January 27, 2011 16:02
SQLite Cmake script for win32 - starting point for iPhone version?
#cmakelists.txt
cmake_minimum_required ( VERSION 2.6 FATAL_ERROR )
project ( sqlite3 C )
SET( CMAKE_INSTALL_PREFIX "f:/doof" )
set ( SOURCES sqlite3.c )
set ( HEADERS sqlite3.h )
@sixman9
sixman9 / install-llvm.sh
Last active December 3, 2022 22:25
Bash script to download and build LLVM and Clang
#!/bin/bash
# install-llvm.sh
# Copyright (c) 2010 Ben Karel. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE.txt file or at http://eschew.org/txt/bsd.txt
# This file was found at http://foster.googlecode.com/hg/scripts and updated by Richard Joseph, Nov 2012
#The current LLVM and CLANG version can be found at http://llvm.org/releases/download.html
#!/usr/bin/python
#gypify.py for GYP (http://code.google.com/p/gyp)
#Found @ http://code.google.com/p/gyp/issues/detail?id=82 (Oct 1, 2009)
#Download original @ http://gyp.googlecode.com/issues/attachment?aid=1601673567448205219&name=gypify.py&token=qm9EhXN3mZxrS1pniUgsh5nG6Bs%3A1328804204976
#Attached is a script that converts a set of existing Chromium-dependent
#.sln and .vcproj files to .gyp. It currently supports executable, shared
#library, static library and build event projects. The output .gyp file is
#created by:
@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 / groovyMap2List.txt
Created July 25, 2012 10:54
Turn/convert a map into a list in Groovy
def m = [a:b, c:d]
def l = []
m.each() { k, v -> l << k }
Alternatively:
def m = new TreeMap([a:b, c:d])
then use m.keySet().each() ...
@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