Skip to content

Instantly share code, notes, and snippets.

View dahabit's full-sized avatar

Ahmed Abu Eldahab dahabit

View GitHub Profile
/*
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
*/
(function() {
var laravel = {
initialize: function() {
this.methodLinks = $('a[data-method]');
function findComponent(result, type) {
for (var i = 0; i , result.address_components.length; i++) {
var component = result.address_components[i];
for (var j = 0; j < component.types.length; j++) {
if (component.types[j] == type) {
return component.short_name;
}
}
}
}
function linkifyText(string){
if (string) {
string = string.replace(
/((https?\:\/\/)|(www\.))(\S+)(\w{2,4})(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi,
function(url){
var full_url = url;
if (!full_url.match('^https?:\/\/')) {
full_url = 'http://' + full_url;
}
(function(wndw) {
var Browsers, OS, Platform, Versions, browser_name, browser_version, os, platform;
Versions = {
Firefox: /firefox\/([\d\w\.\-]+)/i,
IE: /msie\s([\d\.]+[\d])/i,
Chrome: /chrome\/([\d\w\.\-]+)/i,
Safari: /version\/([\d\w\.\-]+)/i,
Ps3: /([\d\w\.\-]+)\)\s*$/i,
Psp: /([\d\w\.\-]+)\)?\s*$/i
};
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/private/etc \
--with-apxs2=/usr/sbin/apxs \
--enable-cli \
--with-config-file-path=/etc \
--with-libxml-dir=/usr \
--with-openssl=/usr \