Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Vladimir Vukanac vukanac

🎯
Focusing
Block or report user

Report or block vukanac

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vukanac
vukanac / osx_bootstrap.sh
Created Mar 26, 2019 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
View osx_bootstrap.sh
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@vukanac
vukanac / xslx_to_csv.js
Created Jul 26, 2017
Read Excel file and save every worksheet as CSV file.
View xslx_to_csv.js
var filename = `${__dirname}/../server/data/sample.xlsx`;
// Read from a file give path to Excel/xlsx file.
var workbook = new Excel.Workbook();
workbook.xlsx
.readFile(filename)
.then(function() {
console.log('Loaded!');
// Write to a file.
// use workbook
@vukanac
vukanac / install-php72-osx.md
Created Aug 20, 2017
How to install php72 on Mac OS X with homebrew.
View install-php72-osx.md

Skip this:

brew tap homebrew/dupes
brew tap homebrew/versions

As:

Warning: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
Warning: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.
@vukanac
vukanac / install-node8-mac-osx.md
Last active Aug 31, 2018
How to install node8 on mac osx 2017-08-20.
View install-node8-mac-osx.md

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.

View gist:190a339305313699cad9d3985cbbcf18
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);
});
View Improve cURL & API Calls.md
    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 Sep 19, 2016 — forked from mikefrancis/README.md
PSR-2 Build System using Sublime Text
View README.md

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:

View Three Wise Monkeys.md

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 Jan 18, 2016 — forked from ziadoz/Version20121011141021.php
Doctrine DBAL and Migrations Example
View Version20121011141021.php
<?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 Sep 23, 2015 — 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
View PSR-2.xml
<?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"/>
You can’t perform that action at this time.