Skip to content

Instantly share code, notes, and snippets.

View misaon's full-sized avatar
🏠
Working from home

Ondřej Misák misaon

🏠
Working from home
View GitHub Profile
@misaon
misaon / Oxy PhpStorm.md
Last active July 31, 2019 08:19
Vývojáři sobě

Oxy PhpStorm

Content

  • Jetbrains toolbox.
  • Php Inspections (link).
  • Docker v PhpStormu.
  • Live templates.
  • Smart regex testing.
  • "Mark Directory as" feature.
  • Gitlab plugin (GitLab Projects)
@misaon
misaon / FetchPairsDoctrine.php
Created March 21, 2018 09:51
Fetch pairs from entity object.
public function getPairs(array $source, string $key, string $value): array
{
$result = [];
$methodPrefixes = ['get', 'is'];
$methodName = function (string $prefix, string $column) {
return $prefix . Strings::firstUpper($column);
};
$getAllProperties = function ($class) {
@misaon
misaon / Doctrine entity pairs
Created March 21, 2018 09:50
Fetch pairs from entity object.
public function getPairs(array $source, string $key, string $value): array
{
$result = [];
$methodPrefixes = ['get', 'is'];
$methodName = function (string $prefix, string $column) {
return $prefix . Strings::firstUpper($column);
};
$getAllProperties = function ($class) {
@misaon
misaon / issue-bitbucket-for-phpsotrm.md
Last active April 26, 2020 14:05
Config Bitbucket issue tracker in PhpStorm

How config PhpStorm for work with BitBucket issue tracker?

  • In PhpStorm Tools > Tasks & Content > Configure servers.
  • Add Server type Generic.

Tab: General

  • Server URL: https://api.bitbucket.org/2.0/repositories/*YOUR LOGIN*/*REPO_NAME*.
  • Fill Username and Password.
  • Put a tick in the Use HTTP authentication.

Tab: Commit Message

  • Put a tick in the Add commit message.
  • #{id} {summary} When commiting ID will be set tasks.
@misaon
misaon / google_mapka_s_hromadou_bodu.html
Created November 27, 2017 11:10
Google mapka s hromadou bodů z webu aktalne
<script type="text/javascript">
// switch (LIB_GRAPHICS.device) {
// case "smart":
// jQuery('.grafika-obal').addClass('smart');
// break;
// default:
// jQuery('.grafika-obal').addClass('desktop');
// }
@misaon
misaon / ubuntu-16.04-vps-nginx-setup.md
Last active January 10, 2018 09:39
Lightweight and speed VPS - Nginx/PHP/MySQL setup (with tweaks) for Ubuntu 16.04

Simple and quick VPS setup for Ubuntu 16.04 (64-bit)

VPS icon

Before install

This VPS configuration is great for Nette framework.

The setup installs the following software:

  • Nginx (latest stable version)
@misaon
misaon / AddressToCoordinates.php
Created May 25, 2017 11:13
Convert address to coordinates
<?php
namespace Sheansro\Models;
/**
* Class AddressToCoordinates
* @package Sheansro\Models
* @author Ondřej Misák <email@ondrejmisak.cz>
*/