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 / 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 .
@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
@smahi
smahi / wordpress-nginx.conf
Created April 30, 2017 09:33 — forked from chrisblackwell/wordpress-nginx.conf
WordPress nginx confuration
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;
# How to echobot with XMPP, BOSH, and Strophe
1. Setup ejabberd(http://www.ejabberd.im/) server and setup account [email protected]
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)
@smahi
smahi / install-ejabberd.sh
Created July 29, 2016 00:11 — forked from jll90/install-ejabberd.sh
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
smahi / package.json
Created July 14, 2016 22:10 — forked from Couto/package.json
Test case for file uploads with Hapi.js. Currently failing when same request is made with a simple 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": {