Skip to content

Instantly share code, notes, and snippets.

View soifou's full-sized avatar
:octocat:
Working from home

François Fleur soifou

:octocat:
Working from home
View GitHub Profile
@soifou
soifou / .env
Created August 8, 2018 12:25
Prestashop 1.6 - some CLI operations in a Makefile
RELEASE_URL = https://download.prestashop.com/download/releases
TRANSLATION_URL = https://www.prestashop.com/download/lang_packs/gzip
LOCALE = fr
DOMAIN = www.website.test
ADMIN_FOLDER = admin777
ADMIN_LOGIN = user@website.com
# the higher version you want to grab
LATEST_PS_VERSION = 1.6.1.20
@soifou
soifou / SomaFM_All.m3u
Created June 6, 2018 05:51 — forked from casaper/SomaFM_All.m3u
SomaFM all Channels Playlist
#EXTM3U
#EXTINF:0,Defcon 128 - Seven Inch Soul: Vintage soul tracks from the original 45 RPM vinyl. [SomaFM]
http://ice1.somafm.com/7soul-128-aac
#EXTINF:0,SomaFM: Seven Inch Soul (#2 ): Vintage soul tracks from the original 45 RPM vinyl.
http://ice2.somafm.com/7soul-128-aac
#EXTINF:0,SomaFM: BAGeL Radio (#1 ): What alternative rock radio should sound like.
http://ice1.somafm.com/bagel-128-mp3
#EXTINF:0,SomaFM: BAGeL Radio (#2 ): What alternative rock radio should sound like.
http://ice2.somafm.com/bagel-128-mp3
#EXTINF:0,SomaFM: Beat Blender (#1 ): A late night blend of deep-house and downtempo chill.
@soifou
soifou / date-first-last.php
Last active August 22, 2017 13:06
Display first/last date of the month from current month during 12 months
<?php
// display first/last date of the month from current month during one year
for ($monthToDisplay = 0; $monthToDisplay < 12; $monthToDisplay++)
{
$f = new \DateTime('first day of this month');
$l = new \DateTime('last day of this month');
$df = new \DateInterval('P'.$monthToDisplay.'M');
$dl = new \DateInterval('P1M');
$first = $f->add($df)->format('d/m/Y');
@soifou
soifou / cask.sh
Created January 26, 2017 10:36
Upgrade and clean macOS casks, the lazy way
#!/usr/bin/env bash
# forked from: https://gist.github.com/joshmanders/515d869a1fc059a1692c20ecdbaae2d3
# inspired by: https://gist.github.com/atais/9c72e469b1cbec35c7c430ce03de2a6b
# Installation
# $ ln -s /path/to/this/cask.sh /usr/local/bin/cask
#
# Usage
# $ cask upgrade (check newest release and download them)

Keybase proof

I hereby claim:

  • I am soifou on github.
  • I am soifou (https://keybase.io/soifou) on keybase.
  • I have a public key ASACamLqnlXMkFaATxaogcQ0aP2J-q23ayxRMHEJAP4NCAo

To claim this, I am signing this object:

@soifou
soifou / adminer-select2.php
Created August 8, 2016 18:31
Transform all Adminer selects into select2 (for filtering)
<?php
class AdminerSelect2
{
function head() {
?>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
<script>
@soifou
soifou / PHPBrew.md
Last active September 8, 2021 18:08
PHPBrew - Manage PHP versions efficiently

PHPBrew

Dependencies

$ apt-get install -y \
    autoconf automake curl libcurl3-openssl-dev build-essential libxslt1-dev \
    re2c libxml2 libxml2-dev bison libbz2-dev libreadline-dev \
    libfreetype6 libfreetype6-dev libpng12-0 libpng12-dev libjpeg-dev libjpeg8-dev \
 libjpeg8 libgd-dev libgd3 libxpm4 libltdl7 libltdl-dev \
@soifou
soifou / zsh-antigen-debian.sh
Last active August 8, 2021 12:57
Quickly setup zsh powered by antigen on fresh Debian servers
#!/bin/bash
# Quickly setup Zsh powered by antigen on fresh Debian servers
# Usage: bash -c "$(curl -fsSL https://gist.githubusercontent.com/soifou/c99be4373f6ffe3b4ff7/raw/COMMIT_ID/zsh-antigen-debian.sh)"
if [[ $(which zsh | wc -m) == 0 ]]; then
echo "Zsh is not installed... installing"
sudo apt-get install -y zsh
fi
@soifou
soifou / iTerm2.md
Last active March 8, 2024 17:03
iTerm2 Shortcuts

iTerm2 Shortcuts

Tab navigation

  • open new tab: Cmd + t
  • next tab: Cmd + Shift + ]
  • previous tab: Cmd + Shift + [

Pane navigation

@soifou
soifou / Command-line snippets collection.md
Last active September 21, 2016 14:12
Command-line snippets collection

Command-line collection

Miscellaneous (and messy) useful snippets to use in command-line.

Files/Folders manipulations

  • Output a specific word in a file For example, /path/phpfile contains something like this:
...