A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer/Packagist - A package and dependency manager.
- Composer Installers - A multi framework Composer library installer.
<html> | |
<head> | |
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'> | |
</head> | |
<body> | |
<div> | |
<h1>Passwords<span> unmask on focus</span></h1> | |
<form> | |
<input type="password" value="" class="password" placeholder="Enter Password" id="password" /> | |
<input type="password" value="" class="password" placeholder="Confirm Password" id="confirm" /> |
<div class="container"> | |
<ul class="flip minutePlay"> | |
<li> | |
<a href="#"> | |
<div class="up"> | |
<div class="shadow"></div> | |
<div class="inn">0</div> | |
</div> | |
<div class="down"> |
<div id="moon_holder"> | |
<div id="moon_back"></div> | |
<img src="http://lab.legomushroom.com/___img/moon2.png" id="moon"> | |
<div id="moon_ball"></div> | |
</div> | |
<div id="center" align="center"> | |
<div id="earth_holder"> | |
<div id="earth_ball"></div> | |
<div id="earth_glow"></div> |
A list of amazingly awesome PHP libraries, resources and shiny things.
prime = function (val) { | |
if (val === 1) return false; | |
else if (val === 2) return true; | |
else if (val !== undefined) { | |
var start = 1; | |
var valSqrt = Math.ceil(Math.sqrt(val)); | |
while (++start <= valSqrt) { | |
if (val % start === 0) { | |
return false; | |
} |
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteRule ^([aA-zZ])$ dostuff.php?username=$1 | |
The rewrite rule for grabbing the subdomain would look like this: | |
RewriteCond %{HTTP_HOST} ^(^.*)\.mywebsite.com | |
RewriteRule (.*) dostuff.php?username=%1 |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} !^public | |
RewriteRule ^(.*)$ /public/$1 [L] |
<?php | |
function crawl_page($url, $depth = 5) | |
{ | |
static $seen = array(); | |
if (isset($seen[$url]) || $depth === 0) { | |
return; | |
} | |
$seen[$url] = true; |
INSERT INTO sites_views ( site_id, views) VALUES ( $site_id, 1) | |
ON DUPLICATE KEY UPDATE views=views+1 |
If you're using msysgit with the OpenSSH tools, you need to either create ~/.ssh/id_rsa, or create a git config in ~/.ssh/config which points to your key. | |
Here's an example of a Git config for bitbucket that will use the correct username, and a key other than the default key (in case you maintain one key for SSH connections, and another for git accounts). | |
Host heroku.com | |
Hostname heroku.com | |
IdentityFile /C/keys/yourkey.key | |
Once in git bash, you can run two commands to add your key to your current session's ssh-agent to avoid having to repeatedly type the key's password. | |
eval `ssh-agent` |