Skip to content

Instantly share code, notes, and snippets.

View ErwanGuillon's full-sized avatar

Erwan Guillon ErwanGuillon

View GitHub Profile
#!/usr/bin/env bash
echo 'start osx/set-defaults.sh'
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
###############################################################################
@ErwanGuillon
ErwanGuillon / install.sh
Last active July 2, 2019 14:10
Install Mac OS for PHP dev
# First, install Oh My ZSH, you have to validate the installation of xcode modules
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install all software
brew cask install slack google-chrome iterm2 microsoft-office sublime-text spectacle sequel-pro phpstorm
brew install [email protected] redis php composer wp-cli wget node
<?php
// Rotate needs lot of memory
ini_set('memory_limit', '256M');
$images_directory = './images/';
$dest_directory = './resized/';
$origin_x = 1600;
$origin_y = 870;
@ErwanGuillon
ErwanGuillon / gist:9697114
Created March 21, 2014 21:43
Unblock us dns mask
echo "server=/unblock-us.com/208.122.23.22" >> /jffs/configs/dnsmasq.conf.add
echo "server=/unblock-us.com/208.122.23.23" >> /jffs/configs/dnsmasq.conf.add
echo "server=/netflix.com/208.122.23.22" >> /jffs/configs/dnsmasq.conf.add
echo "server=/netflix.com/208.122.23.23" >> /jffs/configs/dnsmasq.conf.add
reboot
@ErwanGuillon
ErwanGuillon / html5video.sh
Created October 5, 2012 13:04 — forked from liamcurry/html5video.sh
automated conversion of a file to all three html5 compatible video formats - h.264, ogg, and webm
#!/bin/sh
# Output file for HTML5 video
# requirements: ffmpeg .6+
# usage: ./html5video.sh infile.mp4 640x360
target_directory='converted'
file=`basename $1`
filename=${file%.*}
filepath=`dirname $1`