Skip to content

Instantly share code, notes, and snippets.

View smahi's full-sized avatar

Abesse Smahi smahi

  • Tamanrasset / Algeria
View GitHub Profile
@smahi
smahi / 00.howto_install_phantomjs.md
Created February 16, 2023 04:45 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@smahi
smahi / photos-list.md
Created October 22, 2021 09:35
Unspalsh Photos list, useful for testing in your code as fixture or database seeds
photos_list = [
  "https://images.unsplash.com/photo-1507963901243-ebfaecd5f2f4?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=720&w=1280",
  "https://images.unsplash.com/photo-1456753510773-a8bd200a4a26?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=720&w=1280",
  "https://images.unsplash.com/photo-1444944232907-0b9e9ace348c?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=720&w=1280",
  "https://images.unsplash.com/photo-1475598322381-f1b499717dda?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=720&w=1280",
  "https://images.unsplash.com/photo-1467703834117-04386e3dadd8?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=720&w=1280",
  "https://images.unsplash.com/photo-1475924156734-496f6cac6ec1?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=720&w=1280",
  "https://images.unsplash.com/photo-1500323413110-71ec8ed382f0?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=720&w=1280",
  "https://images.unsplash.com/photo-1474433188271-d3f339f41911?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=720&w=1280",
@smahi
smahi / Dockerfile
Last active July 18, 2020 06:18
Wordpress development environment based on docker, nginx, php-fpm
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

Git Resume

Configure Git (Git اعداد)

Locally (محليا)

git config user.name 'foo'

git config user.email '[email protected]'

@smahi
smahi / vscode_shortcuts.md
Created November 2, 2019 07:19 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

Official List of all commands

Open/View

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

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 .

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 July 28, 2019 21:55 — forked from drawveloper/compress-pdf-with-gs.md
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
smahi / webdev_online_resources.md
Created July 16, 2018 18:05 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@smahi
smahi / iterm2-oh-my-fish.md
Created May 10, 2018 17:57 — forked from leymannx/iterm2-oh-my-fish.md
iTerm2 Solarized Dark theme + Fish shell + oh-my-fish /// macOS High Sierra