Skip to content

Instantly share code, notes, and snippets.


Abesse Smahi smahi

  • Tamanrasset / Algeria
View GitHub Profile
smahi / Dockerfile
Last active Jul 18, 2020
Wordpress development environment based on docker, nginx, php-fpm
View Dockerfile
FROM wordpress:php7.4-fpm-alpine
# this is needed by Codeception
RUN docker-php-ext-install pdo_mysql
# this will add WP-CLI to the container
RUN curl -O
RUN chmod +x wp-cli.phar
RUN mv wp-cli.phar /usr/local/bin/wp

Git Resume

Configure Git (Git اعداد)

Locally (محليا)

git config 'foo'

git config ''

smahi /
Created Nov 2, 2019 — forked from bradtraversy/
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

Official List of all commands


smahi /
Created Sep 29, 2019 — forked from md5/
Demonstration Docker config for Wordpress on PHP-FPM behind Nginx

Proof of concept setup for Wordpress running under PHP-FPM with an Nginx frontend


Build a copy of this image:

git clone git:// docker-nginx-fpm
cd docker-nginx-fpm
docker build -t nginx-fpm .

How to Setup Kiosk mode on Ubuntu

For more details please visit

$ sudo apt update && sudo apt dist-upgrade

$ sudo apt install vim-nox openssh-server chromium-browser x11vnc slick-greeter

On lightdm configuration screen choose lightdm

smahi /
Created Jul 28, 2019 — forked from firstdoit/
Compress PDF files with ghostscript

This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.

ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Other options for PDFSETTINGS:

  • /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
  • /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
  • /printer selects output similar to the Acrobat Distiller "Print Optimized" setting.
  • /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting.
smahi /
Created Jul 16, 2018 — forked from bradtraversy/
Online Resources For Web Developers (No Downloading)
smahi /
Created May 10, 2018 — forked from leymannx/
iTerm2 Solarized Dark theme + Fish shell + oh-my-fish /// macOS High Sierra
smahi / wordpress-nginx.conf
Created Apr 30, 2017 — forked from chrisblackwell/wordpress-nginx.conf
WordPress nginx confuration
View wordpress-nginx.conf
server {
listen 80 default_server;
server_name domain.tld;
access_log /srv/www/domain.tld/logs/access.log;
error_log /srv/www/domain.tld/logs/error.log;
root /srv/www/domain.tld/public;
index index.php index.html index.htm;
client_max_body_size 20M;
View gist:9fdd3b88e3564777bc43c62fc56a9c71
# How to echobot with XMPP, BOSH, and Strophe
1. Setup ejabberd( server and setup account admin@localhost.local
NOTE: localhost should be enough. If you setup something else, make sure you add it at /etc/hosts like this
#/etc/hosts localhost.local
NOTE: Also download Psi(, and make sure you can connect to your ejabberd server.
2. Download strophe( and place it (eg: /Users/makoto/work/sample/strophejs-1.0)