Skip to content

Instantly share code, notes, and snippets.

View vukanac's full-sized avatar
🎯
Focusing

Vladimir Vukanac vukanac

🎯
Focusing
View GitHub Profile
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
@vukanac
vukanac / gist:9188393
Created February 24, 2014 13:27 — forked from vxnick/gist:380904
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
CREATE TABLE IF NOT EXISTS `continents` (
`code` CHAR(2) NOT NULL COMMENT 'Continent code',
`name` VARCHAR(255),
PRIMARY KEY (`code`)
) ENGINE=InnoDB;
INSERT INTO `continents` VALUES
('AF', 'Africa'),
('AS', 'Asia'),
('EU', 'Europe'),
@vukanac
vukanac / gist:9189240
Created February 24, 2014 14:23 — forked from vxnick/gist:380904
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
@vukanac
vukanac / github.css
Last active August 29, 2015 14:24 — forked from theconektd/github.css
body {
font-family: Helvetica, arial, sans-serif;
font-size: 16px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@vukanac
vukanac / PSR-2.xml
Created September 23, 2015 14:28 — forked from netojoaobatista/PSR-2.xml
Code formatter for Zend Studio using the FIG-Standards PSR-2 Coding Style Guide. see: https://github.com/netojoaobatista/PSR-2
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles>
<profile name="PSR-2">
<setting id="com.zend.php.core.formatter.insert_new_line_in_function_invoke" value="0"/>
<setting id="com.zend.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_force_split" value="true"/>
<setting id="com.zend.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_indent_policy" value="2"/>
<setting id="com.zend.php.formatter.core.formatter.alignment_for_arguments_in_allocation_expression_line_wrap_policy" value="1"/>
<setting id="com.zend.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_force_split" value="true"/>
<setting id="com.zend.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_indent_policy" value="2"/>
<setting id="com.zend.php.formatter.core.formatter.alignment_for_arguments_in_method_invocation_line_wrap_policy" value="1"/>
@vukanac
vukanac / Version20121011141021.php
Created January 18, 2016 07:44 — forked from ziadoz/Version20121011141021.php
Doctrine DBAL and Migrations Example
<?php
/*
* /path/to/migrations/directory/Version20121011141021.php
*/
namespace ExampleMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20121011141021 extends AbstractMigration
@vukanac
vukanac / Three Wise Monkeys.md
Created June 9, 2016 21:34
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@vukanac
vukanac / README.md
Created September 19, 2016 20:11
PSR-2 Build System using Sublime Text

PSR-2 Build System using Sublime Text

Installation

Open a new terminal and install Composer:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Once that has finished installing and moved, install the PHP-CS-Fixer Composer package globally:

    use phpFastCache\CacheManager;

    $cache = CacheManager::Memcached();

    // try to get from Cache first.
    $resultsItem = $cache->getItem("identity_keyword")

    if(!$resultsItem->isHit()) {
 $resultsItem-&gt;set($cURL-&gt;get("http://www.youtube.com/api/json/url/keyword/page"))-&gt;expireAfter(3600*24);