Skip to content

Instantly share code, notes, and snippets.

Avatar

Matteo Crippa matteocrippa

  • Italy
View GitHub Profile
@matteocrippa
matteocrippa / bash.sh
Created July 30, 2020 08:02
Heroku Scheduler Monthly
View bash.sh
# first day of the month
if [ "$(date +%d)" = 01 ]; then command; fi
# 15th day of the month
if [ "$(date +%d)" = 15 ]; then command; fi
View gist:8ea1a7f943079cc9bb564b4154c2e60c
# 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
View idea.vmoptions
# 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 November 24, 2022 21:41
Flutter Cheatsheet
View flutter.md

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
View gist:c7aa3ef5c508e1253f02034a906aea60
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
View CUDA_OSX.md
@matteocrippa
matteocrippa / cookie.kt
Created October 16, 2017 19:08
Android share cookie between system and webview
View cookie.kt
@matteocrippa
matteocrippa / mac-setup.sh
Last active December 21, 2022 20:27
A script to automate the setup of a development oriented Macbook machine
View mac-setup.sh
#!/usr/bin/env bash
# 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
brew tap homebrew/cask-fonts
@matteocrippa
matteocrippa / server.py
Last active January 27, 2023 09:37
A simple local http sever from a Mac
View server.py
# Python
python -m SimpleHTTPServer 8080
# Python 3.x
python3 -m http.server --cgi 8080
@matteocrippa
matteocrippa / keybase.md
Created January 29, 2017 15:39
keybase.md
View keybase.md

Keybase proof

I hereby claim:

  • I am matteocrippa on github.
  • I am matteocrippa (https://keybase.io/matteocrippa) on keybase.
  • I have a public key whose fingerprint is 4F14 8EAB 6806 F7F7 F695 C95B F056 A606 8F1B 38FA

To claim this, I am signing this object: