Skip to content

Instantly share code, notes, and snippets.

View matteocrippa's full-sized avatar

Matteo Crippa matteocrippa

View GitHub Profile
@matteocrippa
matteocrippa / iPad-ish-nvm-nodejs.sh
Last active August 18, 2023 22:27
iPad iSH + NVM
echo nameserver 1.1.1.1 > /etc/resolv.conf
apk add --no-cache alpine-sdk bash libstdc++ libc6-compat npm libx11-dev libxkbfile-dev libsecret-dev zsh curl
vi /etc/passwd # replace ash with zsh for root
#wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
#echo "nameserver 1.1.1.1 > /etc/resolv.conf" >> .zshrc
#echo "export NVM_NODEJS_ORG_MIRROR=https://unofficial-builds.nodejs.org/download/release" >> .zshrc
#echo "export NVM_IOJS_ORG_MIRROR=https://example.com" >> .zshrc
#echo "nvm_get_arch() { nvm_echo \"x64-musl\"; }" >> .zshrc
#source .zshrc
#exit
@matteocrippa
matteocrippa / ios_musthave_apps.md
Last active May 26, 2023 09:59
iOS must have apps 2023 [WIP]

📱 iOS must-have Apps 2023

A curated list of must have iOS app for your iPhone (and why not iPad) in 2023!

A

DNSCloack - DNSCloak

OneSec - Distraction free

StrongBox - Keepass Password Manager (alternative to 1Password with lifetime subscription)

@matteocrippa
matteocrippa / bash.sh
Created July 30, 2020 08:02
Heroku Scheduler Monthly
# first day of the month
if [ "$(date +%d)" = 01 ]; then command; fi
# 15th day of the month
if [ "$(date +%d)" = 15 ]; then command; fi
# cpu throttle
sudo apt install git build-essential python3-dev libdbus-glib-1-dev libgirepository1.0-dev libcairo2-dev python3-venv python3-wheel
git clone https://github.com/erpalma/lenovo-throttling-fix.git
sudo ./lenovo-throttling-fix/install.sh
sudo systemctl stop thermald.service
sudo systemctl disable thermald.service
sudo systemctl mask thermald.service
# custom IntelliJ IDEA VM options
-Xms1024m
-Xmx2048m
-XX:ReservedCodeCacheSize=256m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-server
@matteocrippa
matteocrippa / flutter.md
Last active October 26, 2023 05:47
Flutter Cheatsheet

Flutter

A quick cheatsheet of useful snippet for Flutter

Widget

A widget is the basic type of controller in Flutter Material. There are two type of basic Widget we can extend our classes: StatefulWidget or StatelessWidget.

Stateful

StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:

@matteocrippa
matteocrippa / gist:c7aa3ef5c508e1253f02034a906aea60
Created February 23, 2018 10:01
Docker compose update images
docker-compose pull
docker-compose up -d
@matteocrippa
matteocrippa / CUDA_OSX.md
Last active October 26, 2017 13:50
How to use CUDA on macOS High Sierra 10.13
@matteocrippa
matteocrippa / cookie.kt
Created October 16, 2017 19:08
Android share cookie between system and webview
@matteocrippa
matteocrippa / mac-setup.sh
Last active February 26, 2024 12:08
A script to automate the setup of a development oriented Macbook machine
#!/usr/bin/env bash
# Brew
echo "Installing 🍺 Brew!"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "eval $(/opt/homebrew/bin/brew shellenv)" >> .zshrc
# Tap
brew tap homebrew/bundle
brew tap homebrew/core