Skip to content

Instantly share code, notes, and snippets.

Avatar

Abesse Smahi smahi

  • Tamanrasset / Algeria
View GitHub Profile
@smahi
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
WORKDIR /tmp
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
RUN chmod +x wp-cli.phar
RUN mv wp-cli.phar /usr/local/bin/wp
View git-resume.md

Git Resume

Configure Git (Git اعداد)

Locally (محليا)

git config user.name 'foo'

git config user.email 'foo@bar.com'

@smahi
smahi / vscode_shortcuts.md
Created Nov 2, 2019 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode
View vscode_shortcuts.md

VSCode Shortcuts

List of helpful shortcuts for faster coding

Official List of all commands

Open/View

@smahi
smahi / 00_README.md
Created Sep 29, 2019 — forked from md5/00_README.md
Demonstration Docker config for Wordpress on PHP-FPM behind Nginx
View 00_README.md

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

Usage

Build a copy of this image:

git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-nginx-fpm
cd docker-nginx-fpm
docker build -t nginx-fpm .
View ubuntu-kiosk-mode.md

How to Setup Kiosk mode on Ubuntu

For more details please visit http://fisherworks.cn/?p=2517

$ 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
smahi / compress-pdf-with-gs.md
Created Jul 28, 2019 — forked from firstdoit/compress-pdf-with-gs.md
Compress PDF files with ghostscript
View compress-pdf-with-gs.md

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
smahi / webdev_online_resources.md
Created Jul 16, 2018 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
View webdev_online_resources.md
@smahi
smahi / iterm2-oh-my-fish.md
Created May 10, 2018 — forked from leymannx/iterm2-oh-my-fish.md
iTerm2 Solarized Dark theme + Fish shell + oh-my-fish /// macOS High Sierra
View iterm2-oh-my-fish.md
@smahi
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(http://www.ejabberd.im/) 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
127.0.0.1 localhost.local
NOTE: Also download Psi(http://psi-im.org/), and make sure you can connect to your ejabberd server.
2. Download strophe(http://code.stanziq.com/strophe/) and place it (eg: /Users/makoto/work/sample/strophejs-1.0)
You can’t perform that action at this time.