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 / magetool.md
Last active Mar 30, 2016
Install MageTool
View magetool.md

Install MageTool (zf)

Installation via PEAR

# apt-get install php-pear
$ pear upgrade pear

First install ZF on your development machine.

# pear channel-discover pear.zfcampus.org 
@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 / 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:
...
@soifou
soifou / Docker.md
Last active Nov 21, 2016
Docker init
View Docker.md
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 / 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)
@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 / PostfixMandrill.md
Last active Nov 29, 2017
Install Mandrill with Postfix
View PostfixMandrill.md

Postfix / Mandrill

Installation

# apt-get install postfix

Configuration sasl

# vim /etc/postfix/sasl_passwd
View sFTPd.md

FTP - sFTPd

We want to create a FTP user which can access only to a specific directory to upload some files. We do not want the user browse parent directories ; so it will be chrooted.

Installation/Configuration

# apt-get install vsftpd
# vim /etc/vsftpd.conf
@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.
You can’t perform that action at this time.