Skip to content

Instantly share code, notes, and snippets.

View zaherg's full-sized avatar
🎯
Focusing

Zaher Ghaibeh zaherg

🎯
Focusing
View GitHub Profile
@zaherg
zaherg / imagick-3.4.0RC6-PHP7-forge.sh
Created March 3, 2016 15:09 — forked from pascalbaljet/imagick-3.4.0-PHP7-forge.sh
Install Imagick 3.4.0RC6 on PHP 7.0 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget http://pecl.php.net/get/imagick-3.4.0RC6.tgz
tar xvzf imagick-3.4.0RC6.tgz

Guide

Note The extension Imagick is now included in Ondrej's PPA. All you need to do now is $ sudo apt-get install php-imagick, and you're done. I'll keep the guide here because a lot of it is still true for other extensions

======

I've installed PHP7 via Ondrej's PPA. He maintains these PPA's on his free time, consider donating

Install dependencies

@zaherg
zaherg / Makefile
Last active April 5, 2016 09:34 — forked from AlexDisler/Makefile
.PHONY: run
# certs and output
OUTPUT_FILE=apkname.apk
ALIAS=youralias
KEYPASS=yourkeypass
KEYSTORE=certs/yourcert.keystore
UNSIGNED=platforms/android/build/outputs/apk/android-release-unsigned.apk
# or, if you're using Crosswalk:
@zaherg
zaherg / update_curl.sh
Created July 11, 2016 18:27 — forked from fideloper/update_curl.sh
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.47.0.tar.bz2
tar -xvjf curl-7.47.0.tar.bz2
@zaherg
zaherg / raspberry-pi-vpn-router.md
Created November 9, 2016 16:57 — forked from superjamie/raspberry-pi-vpn-router.md
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@zaherg
zaherg / iptables_rules.sh
Created December 5, 2016 06:00 — forked from virtualstaticvoid/iptables_rules.sh
25 Most Frequently Used Linux IPTables Rules Examples
# Modify this file accordingly for your specific requirement.
# http://www.thegeekstuff.com
# 1. Delete all existing rules
iptables -F
# 2. Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
@zaherg
zaherg / build.sh
Created December 17, 2016 09:51
nodejs 0.10.33
#!/usr/bin/sh
apt-get update && apt-get upgrade -y && apt-get install -y build-essential git
mkdir src && cd src
wget -c https://nodejs.org/dist/v0.10.33/node-v0.10.33.tar.gz && tar xvzf node-v0.10.33.tar.gz
cd node-v0.10.33
@zaherg
zaherg / mariadb.sh
Created December 17, 2016 09:57
MariaDB 10.0 on Ubuntu 12.04 LTS
#! /usr/bin/sh
apt-get install python-software-properties
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
add-apt-repository 'deb [arch=amd64,i386] http://fr.mirror.babylon.network/mariadb/repo/10.0/ubuntu precise main'
apt-get update
@zaherg
zaherg / .php_cs
Created December 30, 2016 08:33
php_cs for laravel
<?php
use Symfony\CS\Config\Config;
use Symfony\CS\FixerInterface;
use Symfony\CS\Finder\DefaultFinder;
$excluded_folders = [
'node_modules',
'storage',
'vendor'
@zaherg
zaherg / docker-xenial-copy-paste.sh
Created January 13, 2017 06:51 — forked from BretFisher/docker-xenial-copy-paste.sh
Install Docker PPA on Ubuntu 16.04
# NOT FOR SHELL SCRIPT, but rather just for quick copy paste
# this is a copy-paste version with defaults of full shell script docker-xenial.sh
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \
mkdir -p /etc/apt/sources.list.d && \
echo deb https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list && \
service lxcfs stop && apt-get remove -y -q lxc-common lxcfs lxd lxd-client && \
apt-get update -q && apt-get upgrade -y -q && \
apt-get install -y -q linux-image-extra-$(uname -r) linux-image-extra-virtual && \
apt-get install -y -q docker-engine && \