Skip to content

Instantly share code, notes, and snippets.

View jadb's full-sized avatar

Jad Bitar jadb

View GitHub Profile
@jadb
jadb / github-webhook-handler.php
Last active November 7, 2019 07:34 — forked from milo/github-webhook-handler.php
Github webhook handler
<?php
/**
* GitHub webhook handler template.
*
* @see https://developer.github.com/webhooks/
* @author Miloslav Hůla (https://github.com/milo)
* @author Jad Bitar (https://github.com/jadb)
*/
@jadb
jadb / README.md
Last active September 29, 2015 21:46 — forked from denji/README.md
Remove PhpStorm application, settings and cli-links from Mac OSX

Quick uninstall JetBrains settings:

curl -sL https://gist.github.com/jadb/4b4fe07b778da8a6c377/raw/jetbrains-uninstall.sh | bash -s
@jadb
jadb / 0_reuse_code.js
Created April 4, 2014 17:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jadb
jadb / README.markdown
Created November 27, 2012 23:09 — forked from SteffenL/README.markdown
Bootstrap's Typeahead plugin extended (AJAX functionality, comma-separated values, autowidth, and autoselect)

This is a fork of a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

  • Ability to disable autoselect of first matched element.
  • Ability to automatically set the width of the dropdown to that of the text input.
  • Ability to fetch source element via AJAX
  • Ability to have a comma separated list of tags.

For the proper source, and other examples, please see the original gist.

Example showing off all the above features

@jadb
jadb / cli.args.php
Created October 25, 2012 01:25
Parse PHP CLI arguments
http://pwfisher.com/nucleus/index.php?itemid=45
This command line option parser supports any combination of three types of options (switches, flags and arguments) and returns a simple array.
<?php
/**
* CommandLine class
*
* @package Framework
*/
/**