Skip to content

Instantly share code, notes, and snippets.

View miquelbotanch's full-sized avatar

miquel botanch miquelbotanch

  • Barcelona
View GitHub Profile
@miquelbotanch
miquelbotanch / gist:c5256c2e9d9bbf3153d3
Created December 2, 2014 11:14
Clean all XCode Simulators in one single line.
xcrun simctl list | grep -oh '[A-Z0-9]\{8\}-[A-Z0-9]\{4\}-[A-Z0-9]\{4\}-[A-Z0-9]\{4\}-[A-Z0-9]\{12\}' | xargs -I{} xcrun simctl erase {}
@miquelbotanch
miquelbotanch / git_history.php
Last active August 29, 2015 14:11 — forked from geeknam/git_history.php
Parse git log with PHP to an array
<?php
// Orginal Author: Ngo Minh Nam
$dir = "/path/to/your/repo/";
chdir($dir);
$output = array();
exec('git log -200 --pretty=format:%at%n%an%n%ae%n%h%n%s',$output);
$history = array();
$field = 0;
foreach ($output as $line) {
if ($field == 0) { $commit["date"] = $line; }else // unixtimestamp format
Steps:
Open Terminal.
Run the following command:
defaults write com.apple.appstore ShowDebugMenu -bool true
Relaunch the App Store.
Choose the menu item Debug → Reset Application.
@miquelbotanch
miquelbotanch / LetsEncrypt_HTTPS_plex.MD
Created March 29, 2019 00:14 — forked from churro-s/LetsEncrypt_HTTPS_plex.MD
Setup Let's Encrypt certificate for use with Plex Media Server on Ubuntu
@miquelbotanch
miquelbotanch / .zshrc
Created June 24, 2021 22:10 — forked from khongi/.zshrc
Unraid Zsh with persistent config
# This is your .zshrc, put it in /boot/config/extra/
export ZSH="/root/.oh-my-zsh"
ZSH_THEME="robbyrussell"
DISABLE_UPDATE_PROMPT="true"
plugins=(
zsh-autosuggestions
@miquelbotanch
miquelbotanch / mysql-docker.sh
Created December 19, 2022 00:37 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE