I hereby claim:
- I am hussani on github.
- I am hussani (https://keybase.io/hussani) on keybase.
- I have a public key ASAWSMZ1k72-3F8OesscP6kskjgD6npjUv6Ix7JYEqWHBwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| function validateCnpj($cnpj) | |
| { | |
| $cnpj = preg_replace('/[^0-9]/', '', (string) $cnpj); | |
| if (strlen($cnpj) != 14) { | |
| return false; | |
| } | |
| for ($i = 0, $j = 5, $sum = 0; $i < 12; $i++) { |
| systems({ | |
| "my-app": { | |
| image: {"docker": "azukiapp/php-fpm"}, | |
| provision: [ | |
| // "composer install", | |
| ], | |
| workdir: "/azk/#{manifest.dir}", | |
| mounts: { | |
| '/azk/#{manifest.dir}': path("."), | |
| '/etc/nginx/sites-enabled/nginx_public.conf': path("./nginx_public.conf") |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| if Vagrant.has_plugin?("vagrant-cachier") | |
| config.cache.scope = :box | |
| else | |
| puts "_Info_: Plugin '''vagrant-cachier''' is not installed." |
| class SampleProduct | |
| { | |
| /* implementation */ | |
| public function setBougthBy(UserInterface $user) | |
| { | |
| $this->bougthBy = $user; | |
| } | |
| } |
| /* | |
| Uses http://github.com/kylefox/jquery-modal to open video into modal box | |
| */ | |
| var playlistId, key, maxResults, nextPageToken, prevPageToken; | |
| playlistId = "playlistID"; | |
| key = "apiConsumerKey"; | |
| maxResults = 50; |
| <?php | |
| use Respect\Relational\Mapper; | |
| use Respect\Relational\Sql; | |
| // Create instance of Mapper | |
| $mapper = new Mapper(new PDO('mysql:host=127.0.0.1;port=3306;dbname=blog','root','root')); | |
| // Persisting data |
A list of amazingly awesome PHP libraries, resources and shiny things.