Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| <?php | |
| // secure hashing of passwords using bcrypt, needs PHP 5.3+ | |
| // see http://codahale.com/how-to-safely-store-a-password/ | |
| // salt for bcrypt needs to be 22 base64 characters (but just [./0-9A-Za-z]), see http://php.net/crypt | |
| $salt = substr(strtr(base64_encode(openssl_random_pseudo_bytes(22)), '+', '.'), 0, 22); | |
| // 2y is the bcrypt algorithm selector, see http://php.net/crypt | |
| // 12 is the workload factor (around 300ms on my Core i7 machine), see http://php.net/crypt | 
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| /** | |
| * jQuery Favicon plugin | |
| * http://hellowebapps.com/products/jquery-favicon/ | |
| * | |
| * Copyright (c) 2010 Volodymyr Iatsyshyn ([email protected]) | |
| * Dual licensed under the MIT and GPL licenses: | |
| * http://www.opensource.org/licenses/mit-license.php | |
| * http://www.gnu.org/licenses/gpl.html | |
| * | |
| * | 
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD | 
| /* | |
| * Copyright (C) 2012 René Jeschke <[email protected]> | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | 
I work as an analyst contractor, these days my roles are often a mixture of development and management. I have been asked by a countless number of people what they need to do to get the jobs I’m offered – and it’s simpler than most expect. The market for talented developers in the United Kingdom (and in many talent-lite communities around the world) is such that anyone who merely knows what they are doing has a very good chance of getting a job. Even a job contracting (which ordinarily has senior-level requirements).
To become a web developer with a good salary and employment expectations you need skills. Below I’ll provide a plan to get you towards the top of the largest market: PHP Web Development. Advanced knowledge of everything on this list would immediately make you one of the best, so just strive to have an exposure if not a comprehensive understanding (though the *starred points are essential). To learn these technologies you should use several in combination on on
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| /** | |
| * © 2012 Typesafe Inc. | |
| * | |
| * Extracted from http://doc.akka.io/docs/akka/2.1.0-RC2/scala/io.html | |
| */ | |
| import akka.actor._ | |
| import akka.util.{ ByteString, ByteStringBuilder } | |
| import java.net.InetSocketAddress | 
| <?php | |
| /** | |
| * Конвертер регулярного выражения | |
| * | |
| * @author Pakhtinov Dmitriy | |
| * @copyright 2012 Pakhtinov Dmitriy | |
| * @data 14.11.2012 | |
| */ | |
| class PCREConverter { | 
| <?php | |
| /** | |
| * Использование: | |
| * $v = new VideoThumb($link); | |
| * $v->getVideo(); //Ссылка на видео | |
| * $v->getTitle(); //Название ролика | |
| * $v->fetchImage($path) //Скачать самое большое превью ролика | |
| * | |
| * Прогнать тест: |