Skip to content

Instantly share code, notes, and snippets.

View ibraah88's full-sized avatar
🎯
Focusing

ibraah ibraah88

🎯
Focusing
View GitHub Profile
@ibraah88
ibraah88 / MANUAL.md
Created April 13, 2021 20:58 — forked from kimyvgy/MANUAL.md
Deploy nodejs app with gitlab.com and pm2

Deploy nodejs app with gitlab.com and pm2

This manual is about setting up an automatic deploy workflow using nodejs, PM2, nginx and GitLab CI. It is tested on:

  • Target server: Ubuntu 16.04 x64. This is suitable for Ubuntu 14.x.
  • Windows 10 on my PC to work.
@ibraah88
ibraah88 / http-status-codes.md
Created October 9, 2019 15:01 — forked from subfuzion/http-status-codes.md
General REST API HTTP Status Codes

Reference: RFC 2616 - HTTP Status Code Definitions

General

  • 400 BAD REQUEST: The request was invalid or cannot be otherwise served. An accompanying error message will explain further. For security reasons, requests without authentication are considered invalid and will yield this response.
  • 401 UNAUTHORIZED: The authentication credentials are missing, or if supplied are not valid or not sufficient to access the resource.
  • 403 FORBIDDEN: The request has been refused. See the accompanying message for the specific reason (most likely for exceeding rate limit).
  • 404 NOT FOUND: The URI requested is invalid or the resource requested does not exists.
  • 406 NOT ACCEPTABLE: The request specified an invalid format.
@ibraah88
ibraah88 / scan_png.ps1
Created September 10, 2019 08:04 — forked from vadimkantorov/scan_png.ps1
A PowerShell script to acquire an image from a scanner and to save it in PNG
$deviceManager = new-object -ComObject WIA.DeviceManager
$device = $deviceManager.DeviceInfos.Item(1).Connect()
$wiaFormatPNG = "{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}"
foreach ($item in $device.Items) {
$image = $item.Transfer($wiaFormatPNG)
}
if($image.FormatID -ne $wiaFormatPNG)
{
@ibraah88
ibraah88 / libreadline_6_not_found.sh
Created February 11, 2019 10:36 — forked from wbotelhos/libreadline_6_not_found.sh
Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError)
ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
@ibraah88
ibraah88 / Dockerfile
Created January 10, 2019 14:41 — forked from kyleferguson/Dockerfile
Example Laravel deployment for Kubernetes
FROM php:7.1-apache
ADD . /var/www
ADD ./site.conf /etc/apache2/sites-enabled/000-default.conf
RUN apt-get update && apt-get install -y libmcrypt-dev mysql-client && \
docker-php-ext-install mcrypt pdo_mysql opcache && \
pecl install redis-3.1.2 && docker-php-ext-enable redis && \
a2enmod rewrite
@ibraah88
ibraah88 / GO LANG
Last active December 12, 2018 14:40
https://golangbot.com/learn-golang-series/
https://gist.github.com/ivangabriele/1c552aadc247c0a2f256292c1e49de15
https://github.com/golang-standards/project-layout
https://github.com/gin-gonic/gin
http://cgrant.io/tutorials/go/simple-crud-api-with-go-gin-and-gorm/
@ibraah88
ibraah88 / gitconfig.ini
Created November 7, 2018 13:43 — forked from tdd/gitconfig.ini
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = your@email.tld
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
st = status
@ibraah88
ibraah88 / install-rancher-compose.sh
Created October 1, 2018 12:14 — forked from jeefy/install-rancher-compose.sh
Rancher Compose Install Script
#!/bin/bash
# To run locally: ` curl -s https://gist.githubusercontent.com/jeefy/7fed19a335d5caae24639e7ee7be1b71/raw/install-rancher-compose.sh | sh `
VERSION_NUM="0.9.2"
wget https://github.com/rancher/rancher-compose/releases/download/v${VERSION_NUM}/rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz
tar zxf rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz
rm rancher-compose-linux-amd64-v${VERSION_NUM}.tar.gz
sudo mv rancher-compose-v${VERSION_NUM}/rancher-compose /usr/local/bin/rancher-compose
@ibraah88
ibraah88 / wildfly-install.sh
Created May 9, 2016 19:51 — forked from sukharevd/wildfly-install.sh
Script to install JBoss Wildfly 10.x as service in Linux
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 10.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :2015-10-24T17:14-0700
#usage :/bin/bash wildfly-install.sh
#tested-version :10.0.0.CR3
#tested-distros :Debian 7,8; Ubuntu 15.10; CentOS 7; Fedora 22