Skip to content

Instantly share code, notes, and snippets.

View dreammonkey's full-sized avatar

Diederik van Remoortere dreammonkey

  • TBWA Belgium
  • Antwerp, Belgium
View GitHub Profile
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"s3:GetBucketLocation"
],
"Resource": "*"
@dreammonkey
dreammonkey / gist:7983e0fd212c09e3d11f40bb7d3b12bc
Created January 29, 2020 13:28
git: backup master branch and start form empty master
; clone the repo
git clone <repository>
; make sure HEAD is master (optional)
git checkout master
; make a local backup of master branch
git branch -m master master_backup
; push local backup branch to server
git push -u origin master_backup
; checkout master using --orphan
git checkout --orphan master
1. download PECL:
$ curl -O https://pear.php.net/go-pear.phar
2.install PECL in MAMP PHP folder:
$ sudo php -d detect_unicode=0 go-pear.phar
!!! make sure the installation directories look like this: !!!
1. Installation base ($prefix) : /Applications/MAMP/bin/php/php7.2.14
2. Temporary directory for processing : /tmp/pear/install
brew cask install google-chrome
$view = $this->load->view('some_view', '', true);
chown -R user:group folder
SELECT field, COUNT(*) c FROM table GROUP BY field HAVING c > 1
update table set datefield = datefield + interval 1 day;
@dreammonkey
dreammonkey / gist:2c59288602aa86a319b87afa60594062
Created September 5, 2016 12:22
PHP xdebug modify limits
; with sane limits
xdebug.var_display_max_depth = 5
xdebug.var_display_max_children = 256
xdebug.var_display_max_data = 1024
; with no limits
; (maximum nesting is 1023)
xdebug.var_display_max_depth = -1
xdebug.var_display_max_children = -1
@dreammonkey
dreammonkey / gist:210fc373da915c8a487e
Created December 29, 2015 09:45
Facebook Graph API load profile picture
https://graph.facebook.com/v2.5/{fbid}/picture?width=250&height=250&type=normal&redirect=true