View get_previous_url.js
$(document).ready(function() { | |
var referrer = document.referrer; | |
console.log(referrer); | |
}); | |
// open your console |
View generate_random_id.js
function makeid() | |
{ | |
var text = ""; | |
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
for( var i=0; i < 5; i++ ) | |
text += possible.charAt(Math.floor(Math.random() * possible.length)); | |
return text; | |
} |
View lite_random_generator.js
Math.random().toString(36).substring(7); |
View jquery_details_detect.js
(function (window) { | |
var browser, | |
version, | |
mobile, | |
os, | |
osversion, | |
bit, | |
ua = window.navigator.userAgent, | |
platform = window.navigator.platform; |
View return_path_url.php
<?php | |
$url = '//www.example.com/path?googleguy=googley'; | |
// Prior to 5.4.7 this would show the path as "//www.example.com/path" | |
var_dump(parse_url($url)); | |
//output will be like | |
// array(3) { |
View domain_compare.php
<?php | |
$url1 = parse_url("http://www.google.co.uk"); | |
$url2 = parse_url("http://www.google.co.uk/pages.html"); | |
if ($url1['host'] == $url2['host']){ | |
//matches | |
}else{ | |
// not matches | |
} |
View laravel-package
So, you're done making the website or web-app and now you would wanna distribute it to your clients. Awesome. Let's go ahead and create a package for the same. | |
There are two types of packaging that can be done in laravel: | |
1. VPS | |
2. Shared | |
VPS | |
VPS version is for their own use and local testing. So, you would wanna keep it as close to your local system settings as possible. | |
1. Delete all the files from app/storage/ in the following folders: | |
cache |
OlderNewer