Skip to content

Instantly share code, notes, and snippets.

View vukanac's full-sized avatar
🎯
Focusing

Vladimir Vukanac vukanac

🎯
Focusing
View GitHub Profile
@vukanac
vukanac / install-node8-mac-osx.md
Last active August 31, 2018 17:28
How to install node8 on mac osx 2017-08-20.

How to install node8 on mac osx

At an absolute minimum, you need to go into the home directories (the ones that start with ~/) and make sure you are okay with deleting the contents of those directories. If you are unsure if this will delete anything important, you should stop now and find another alternative for re-installing Node.js, because this approach is pretty destructive.

it('should refuse partial submissions', function(done) {
var browser = this.browser;
browser.fill('first_name', 'John');
browser.pressButton('Send').then(function() {
assert.ok(browser.success);
assert.equal(browser.text('h1'), 'Contact');
assert.equal(browser.text('div.alert'), 'Please fill in all the fields');
}).then(done, done);
});
    use phpFastCache\CacheManager;

    $cache = CacheManager::Memcached();

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

    if(!$resultsItem->isHit()) {
 $resultsItem->set($cURL->get("http://www.youtube.com/api/json/url/keyword/page"))->expireAfter(3600*24);
@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:

@vukanac
vukanac / Three Wise Monkeys.md
Created June 9, 2016 21:34 — forked from malarkey/Three Wise Monkeys.md
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 / 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 / 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 / github.css
Last active August 29, 2015 14:24 — forked from andyferra/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 / 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',
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'),