Skip to content

Instantly share code, notes, and snippets.

smahi

  • 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
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)
@smahi
smahi / install-ejabberd.sh
Created Jul 29, 2016 — forked from jll90/install-ejabberd.sh
Install ejabberd on centos7
View install-ejabberd.sh
#! 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 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.