Skip to content

Instantly share code, notes, and snippets.

View eexit's full-sized avatar
🌴
On vacation

Joris Berthelot eexit

🌴
On vacation
View GitHub Profile
@eexit
eexit / BodyRewinderMiddleware.php
Last active November 2, 2022 18:06
The Guzzle 7 BodyRewinderMiddleware allows to rewind a body which would have been read and not rewinded by previous middlewares.
<?php
declare(strict_types=1);
namespace App\GuzzleMiddleware;
use GuzzleHttp\Promise\PromiseInterface;
use GuzzleHttp\Psr7\Message;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
@eexit
eexit / README.md
Last active March 14, 2022 17:59
YouTube Watch History Replayer
@eexit
eexit / memcached-clean.pl
Created July 21, 2021 12:18
I don't recall who is the author of this script.
#!/usr/bin/perl
use 5.10.0;
use Cache::Memcached;
use Data::Dumper;
use MIME::Base64;
use strict;
@eexit
eexit / out.log
Created July 7, 2020 20:19
Go basic string slice filter
=== RUN Test_remove
=== RUN Test_remove/want_and_list_are_empty
=== RUN Test_remove/list_is_empty
=== RUN Test_remove/list_contains_only_one_occurence_of_wanted
=== RUN Test_remove/list_contains_only_occurences_of_wanted
=== RUN Test_remove/list_contains_one_occurence_of_wanted
=== RUN Test_remove/list_does_not_contain_occurence_of_wanted
--- PASS: Test_remove (0.00s)
--- PASS: Test_remove/want_and_list_are_empty (0.00s)
--- PASS: Test_remove/list_is_empty (0.00s)
@eexit
eexit / hint.md
Created November 21, 2018 15:49
macOS quarantine
@eexit
eexit / Ghost content update.md
Last active August 3, 2023 22:41
Upload Ghost local storage images to Cloudinary

Ghost content update

  1. Export your Ghost content (aka backup)
  2. Open in an editor that support Regex find/replace
  3. Search for:
/content/images/\d{4}/(\w{3}|\d{2})/

Keybase proof

I hereby claim:

  • I am eexit on github.
  • I am eexit (https://keybase.io/eexit) on keybase.
  • I have a public key ASBA_xPOhPPBPMv-2ynWqZ9AoIyX6Sb-mV7nHomaM5gfnQo

To claim this, I am signing this object:

@eexit
eexit / lister.sh
Created September 19, 2017 09:18
AWS S3 List + Rename Specific Files
#!/bin/bash
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
# Very importe: KEEP the --dryrun flag!!
aws s3 cp s3://bucket-name . --dryrun --recursive --exclude '*' --include '*.gzip' \
| tr "\r" "\n" \
| grep -v '^Completed ' \
| cut -d' ' -f3 > filename

Rooting Moto Z2 Play

Guide to root your device without installing a custom recovery.

Requires:

@eexit
eexit / Getting a Moto X back to stock on OSX Raw.md
Last active November 28, 2020 17:37
Getting a Moto X back to stock on OSX

Getting a Moto X back to stock on OSX

Backup, first!

  1. Downloads the Android SDK Command Line Tools

     $ unzip android-sdk-macosx.zip
     $ cd android-sdk-macosx
    
  2. Create a backup folder