Skip to content

Instantly share code, notes, and snippets.

View mdabbagh88's full-sized avatar

Mohammed Eldabbagh mdabbagh88

  • Istanbul, Turkey
View GitHub Profile
2015-07-30 18:18:27 +0200
./configure
--prefix=/usr/local/Cellar/php54/5.4.43_2
--localstatedir=/usr/local/var
--sysconfdir=/usr/local/etc/php/5.4
--with-config-file-path=/usr/local/etc/php/5.4
--with-config-file-scan-dir=/usr/local/etc/php/5.4/conf.d
--mandir=/usr/local/Cellar/php54/5.4.43_2/share/man
--enable-bcmath
@mdabbagh88
mdabbagh88 / PushNotifications.php
Created July 30, 2016 17:28 — forked from joashp/PushNotifications.php
Simple PHP script to send Android Push Notification, iOS Push Notification and Windows Phone 8 Push Notification
<?php
// Server file
class PushNotifications {
// (Android)API access key from Google API's Console.
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI';
// (iOS) Private key's passphrase.
private static $passphrase = 'joashp';
// (Windows Phone 8) The name of our push channel.
private static $channelName = "joashp";
@mdabbagh88
mdabbagh88 / gist:45ff0d2faef7494b2d28dff1bddb36f1
Last active July 3, 2016 21:05 — forked from leapingbytes/gist:949b34ac7bd83965233f
How to make Wildfly send "Connection: close" instead of "Connection: keep-alive"
<subsystem xmlns="urn:jboss:domain:undertow:1.1">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" always-set-keep-alive="false"/>
<https-listener name="default-s" socket-binding="https" security-realm="UndertowRealm" always-set-keep-alive="false"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<access-log prefix="access"/>
<filter-ref name="connection-close"/>
<filter-ref name="server-header"/>
@mdabbagh88
mdabbagh88 / osx-for-hackers.sh
Created July 3, 2016 01:54 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
#!/usr/bin/env bash
echo "Cleaning up..."
rm -rf bin/ src/
echo "Copying sources..."
mkdir src/
find SSLKillSwitch -type f \( -name "*.h" -o -name "*.m" -o -name "*.c" \) -exec cp {} src/ \;
BIN_NAME="SSLKillSwitch2.dylib"
@mdabbagh88
mdabbagh88 / wildfly-install.sh
Created May 24, 2016 19:14 — 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
@mdabbagh88
mdabbagh88 / wrtbwmon
Created April 5, 2016 02:38 — forked from heyeshuang/wrtbwmon
wrtbwmon -- modified for openwrt
#!/bin/sh
#
# Traffic logging tool for OpenWRT-based routers
# Original code at https://code.google.com/p/wrtbwmon/
# For usage with OpenWRT, take a look at http://heyeshuang.tk/?p=268
# Created by Emmanuel Brucy (e.brucy AT qut.edu.au)
# Modified by HeYSH (yeshuanghe AT gmail.com)
#
# Based on work from Fredrik Erlandsson (erlis AT linux.nu)
# Based on traff_graph script by twist - http://wiki.openwrt.org/RrdTrafficWatch
import Foundation
extension String
{
var length: Int {
get {
return countElements(self)
}
}
@mdabbagh88
mdabbagh88 / j2objc.rb
Created March 28, 2016 11:52 — forked from bsorrentino/j2objc.rb
J2OBJC FORMULA (HOMEBREW)
# Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md
# /usr/local/Library/Contributions/example-formula.rb
#
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
#
# FOR LOCAL INSTALLATION COPY IT IN /usr/local/Library/Formula/
#
class J2objc < Formula
homepage "http://j2objc.org/"
@mdabbagh88
mdabbagh88 / systemversion.c
Created February 8, 2016 20:11 — forked from deltheil/systemversion.c
iOS: get device OS version from C code via the Objective-C Runtime
#include <objc/runtime.h>
#include <objc/message.h>
#include <CoreFoundation/CoreFoundation.h>
/* ... */
/**
* Return a character string that holds the current version
* of the operating system which is equivalent to: