The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
<?php | |
function random_password( $length = 8 ) { | |
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?"; | |
$password = substr( str_shuffle( $chars ), 0, $length ); | |
return $password; | |
} | |
?> |
This elevator "hack" will allow you to go immediately to your destination floor, bypassing all previously queued floors.
Note: One LifeHacker commenter said: "it is completely dependant on the Logic Controller being used in the motor room of the elevator, as this trick does not work on older elevators".
for f in "$@" | |
do | |
filename="${f%.*}" | |
plutil -convert json "$filename".plist -o "$filename".json | |
done |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
<meta http-equiv="Content-Security-Policy" content=" | |
default-src 'self' data: gap: https://ssl.gstatic.com; | |
script-src 'self' 'unsafe-inline' 'unsafe-eval'; | |
style-src 'self' 'unsafe-inline'; | |
img-src 'self' data:; | |
media-src *;"> |
These are instructions for configuring an Android expansion pack for an Ionic project (Cordova 5.0). These instructions include the bundle ID of a specific app, please replace with your own.
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Bootstrap Starter Template</title> | |
<!-- Bootstrap --> |
/** | |
* Changes the requested URL to lowercase. | |
* | |
* Only if URL does not include a filename or query variable. | |
*/ | |
function force_lowercase_urls() { | |
// Grab requested URL | |
$url = $_SERVER['REQUEST_URI']; | |
// If URL contains a period, halt (likely contains a filename and filenames are case specific) | |
if ( preg_match('/[\.]/', $url) ) { |