Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Working from home

François Fleur soifou

:octocat:
Working from home
View GitHub Profile
@soifou
soifou / .env
Created Aug 8, 2018
Prestashop 1.6 - some CLI operations in a Makefile
View .env
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 Jun 6, 2018 — forked from casaper/SomaFM_All.m3u
SomaFM all Channels Playlist
View SomaFM_All.m3u
#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 Aug 22, 2017
Display first/last date of the month from current month during 12 months
View date-first-last.php
<?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 Jan 26, 2017
Upgrade and clean macOS casks, the lazy way
View cask.sh
#!/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)
View keybase.md

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 Aug 8, 2016
Transform all Adminer selects into select2 (for filtering)
View adminer-select2.php
<?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 Nov 21, 2020
PHPBrew - Manage PHP versions efficiently
View PHPBrew.md

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 Nov 9, 2020
Quickly setup zsh powered by antigen on fresh Debian servers
View zsh-antigen-debian.sh
#!/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 Oct 28, 2020
iTerm2 Shortcuts
View iTerm2.md

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 Sep 21, 2016
Command-line snippets collection
View Command-line snippets collection.md

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:
...
You can’t perform that action at this time.