Skip to content

Instantly share code, notes, and snippets.

View mCzolko's full-sized avatar

Michael Czolko mCzolko

View GitHub Profile
@mCzolko
mCzolko / PersistLotEntitiesCommand.php
Created August 23, 2015 00:25
Base Command object for saving huge amout of entities to prevent memory leaks.
<?php
namespace Acme\DemoBundle\Command;
use Doctrine\ORM\EntityManager;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
abstract class PersistLotEntitiesCommand extends ContainerAwareCommand
@mCzolko
mCzolko / oracle.acconut
Created February 1, 2015 22:49
Oracle account
Username: [email protected]
Password: Heslo1234
@mCzolko
mCzolko / user.json
Created December 15, 2014 14:54
Sublime text 3 config
{
"color_scheme": "Packages/Predawn/predawn.tmTheme",
"findreplace_small": true,
"font_size": 12,
"ignored_packages":
[
"Vintage"
],
"scroll_past_end": true,
"show_encoding": true,
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
who = shortlog -s --
mergedone = merge --no-ff --no-commit
fo = fetch origin
rh = reset --hard origin
@mCzolko
mCzolko / gulpfile.js
Last active January 3, 2016 22:59
If you want to use CoffeeScript for Gulp config instead of JS.
// Require some necessary modules.
require('coffee-script');
var gutil = require('gulp-util');
// Specify, where is your Gulp config in CoffeeScript placed.
var gulpfile = 'Gulpfile.coffee';
// Print notification into the console.
gutil.log('Using file', gutil.colors.magenta(gulpfile));
@mCzolko
mCzolko / Redis.php
Created June 22, 2013 10:01
Simple redis client
<?php
/**
* @author Michael Czolko <[email protected]>
* Date: 6/21/13
* Time: 9:16 PM
*/
namespace flow\simple\cache;
use flow\Config;
@mCzolko
mCzolko / FA2Symfony2.md
Last active April 23, 2019 04:11
How to integrate Font Awesome to Symfony 2

Integration

It's easy to integrate Font Awesome into Symfony2 (Twitter Bootstrap, or even use it on its own).

Composer

Add those lines to composer.json

{
  "repositories": [
    {
      "type": "package",

Installation Twitter Bootstrap to Symfony2 Framework

Step by step to install bootstrap to this awesome framework.

Composer

First of all. Add dependency to composer.json file.

{
  "require": {
    "twitter/bootstrap": "2.3.*"
  }
@mCzolko
mCzolko / control.coffee
Created March 13, 2013 13:20
When is control in clients viewport - trigger SCREENON event and when is not trigger SCREENOUT event. Component react on browser resize and scroll. Awesome!
###*
@fileoverview Komponenta, která ví, jestli je ve viewportu uživatele
popř. střílí eventy, že je viditelná a naopak
@author Michael Czolko <[email protected]>
###
goog.provide 'wikidi.ui.Control'
goog.require 'wikidi.events.EventType'
goog.require 'goog.ui.Control'
#############################################################################
# current prompt
#############################################################################
# \d – Current date
# \t – Current time
# \h – Host name
# \# – Command number
# \u – User name
# \W – Current working directory (ie: Desktop/)
# \w – Current working directory, full path (ie: /Users/Admin/Desktop)