Skip to content

Instantly share code, notes, and snippets.


  • Tamanrasset / Algeria
Block or report user

Report or block smahi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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)
smahi /
Created Jul 29, 2016 — forked from jll90/
Install ejabberd on centos7
#! bin bash
#This script installs a ejabberd on centos7
echo 'Updating packages...'
sudo yum update -y
echo 'Install wget'
sudo yum install wget -y
echo 'Download EPEL'
smahi / package.json
Created Jul 14, 2016 — forked from Couto/package.json
Test case for file uploads with Hapi.js. Currently failing when same request is made with a simple JSON.
View package.json
"name": "file-upload",
"version": "1.0.0",
"description": "File Upload test case",
"main": "server.js",
"dependencies": {
"hapi": "^8.0.0-rc8",
"joi": "^5.0.2"
"devDependencies": {
You can’t perform that action at this time.