Skip to content

Instantly share code, notes, and snippets.

View matteocrippa's full-sized avatar

Matteo Crippa matteocrippa

View GitHub Profile
@ZevEisenberg
ZevEisenberg / resetAllSimulators.sh
Last active December 23, 2024 19:57
Reset all iOS simulators with this one weird trick
osascript -e 'tell application "iOS Simulator" to quit'
osascript -e 'tell application "Simulator" to quit'
xcrun simctl erase all
@frdmn
frdmn / osx-10-10-virtualbox.md
Last active February 22, 2022 08:39
Install OS X 10.10 Yosemite in VirtualBox
@tmarshall
tmarshall / aws-sns-example.js
Last active October 30, 2022 06:12
aws-sdk sns example, in Node.js
var AWS = require('aws-sdk');
AWS.config.update({
accessKeyId: '{AWS_KEY}',
secretAccessKey: '{AWS_SECRET}',
region: '{SNS_REGION}'
});
var sns = new AWS.SNS();
@lostincode
lostincode / gist:909b72f96bfbf8d7f956
Created November 14, 2014 05:49
Google Analytics Swift Extension
import UIKit
extension UIViewController {
func setScreeName(name: String) {
self.title = name
self.sendScreenView()
}
@dimetron
dimetron / gist:b82acf0faa3aef23df17
Last active May 8, 2018 08:57
Digital ocean Open VPN setup Docker
# Update Docker
curl -sSL https://get.docker.com/ubuntu/ | sudo sh
sudo docker version
# Run VPN
sudo docker run -d --privileged --name vpn --restart=always -p 1194:1194/udp -p 443:443/tcp --dns=8.8.8.8 jpetazzo/openvpn /bin/sh -c run
sudo docker run -t -i -p 8080:8080 --dns=8.8.8.8 --rm --volumes-from vpn jpetazzo/openvpn serveconfig
@satreix
satreix / custom_archlinux_live_USB.md
Last active July 12, 2025 21:44
Custom Arch Linux live USB

Custom Arch Linux live USB

Setup

Install the dependencies for the archiso package:

(root): pacman -S make squashfs-tools libisoburn dosfstools patch lynx devtools git

I recommend archiso getting them from git, there is a package in the repositories, however, at this time of writing, it will not work with the instructions below. So, grab the most recent version from git and install it:

(user): git clone git://projects.archlinux.org/archiso.git && cd archiso

#!/bin/sh
### BEGIN INIT INFO
# Provides: dockercompose
# Required-Start: $docker
# Required-Stop: $docker
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Docker Services
### END INIT INFO
@domachine
domachine / docker-compose-daemon.sh
Created April 28, 2015 16:29
run docker-compose in daemon mode and attach to web container
docker-compose up -d
docker attach myapp_web_1
@cmelchior
cmelchior / SerializeToJson.java
Last active September 20, 2022 04:30
Serialize Realm objects to JSON using GSON
// GSON can parse the data.
//
// Deserialization:
// Note there is a bug in GSON 2.3.1 that can cause it to StackOverflow when working with RealmObjects.
// To work around this, use the ExclusionStrategy below or downgrade to 1.7.1
// See more here: https://code.google.com/p/google-gson/issues/detail?id=440
//
// Serialization:
// <Type>RealmProxy objects are created by the Realm annotation processor. They are used to control
// access to the actual data instead of storing them in fields and it is therefore them we need to register a
@GilLevi
GilLevi / README.md
Last active July 25, 2023 18:05
Age and Gender Classification using Convolutional Neural Networks