Skip to content

Instantly share code, notes, and snippets.

@Mrkisha
Mrkisha / MenuBuilder.php
Last active August 29, 2015 14:08 — forked from nateevans/MenuBuilder.php
Knp Menu Builder Bootstrap 3 and Fontawesome Custom
<?php
namespace Acme\HelloBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\DependencyInjection\ContainerAware;
class MenuBuilder extends ContainerAware
{
public function mainMenu(FactoryInterface $factory, array $options)
.ui-datepicker {
background-color: #fff;
border: 1px solid #66AFE9;
border-radius: 4px;
box-shadow: 0 0 8px rgba(102,175,233,.6);
display: none;
margin-top: 4px;
padding: 10px;
width: 240px;
}
@Mrkisha
Mrkisha / zmq.sh
Created December 14, 2014 13:20
Install ZeroMQ 0mz on ubuntu
#How to install zmq extention on Ubuntu
cd ~/
git clone git://github.com/mkoppanen/php-zmq.git
cd php-zmq
phpize && ./configure
sudo su
make && make install
cd ~/zmq/php-zmq/modules
echo 'extension=zmq.so' | sudo tee /etc/php5/mods-available/zmq.ini
sudo php5enmod php-zmq
@Mrkisha
Mrkisha / idea.properties
Created April 22, 2015 06:59
PHPStorm 8.0.3 custom path to IDE folder (.WebIde80)
# Use ${idea.home} macro to specify location relative to IDE installation home.
# Use ${xxx} where xxx is any Java property (including defined in previous lines of this file) to refer to its value.
####################################################################################################################
# Note for Windows users: please make sure you're using forward slashes (e.g. c:/idea/system).
####################################################################################################################
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
@Mrkisha
Mrkisha / idea.properties
Created April 22, 2015 07:01
Intellij 14.1.1 custom path to IDE folder (.IdeaIC14)
# Use ${idea.home} macro to specify location relative to IDE installation home.
# Use ${xxx} where xxx is any Java property (including defined in previous lines of this file) to refer to its value.
####################################################################################################################
# Note for Windows users: please make sure you're using forward slashes (e.g. c:/idea/system).
####################################################################################################################
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
@Mrkisha
Mrkisha / Symfony Bundles
Created June 15, 2015 08:02
Symfony Bundles to see what other big projects use
https://github.com/WellCommerce/WellCommerce/blob/development/composer.json
@Mrkisha
Mrkisha / Start and SSH Vagrant and go to dir .sh
Last active August 29, 2015 14:23
Start Vagrant, ssh and go to dir all in 1 command
cd ~ && cd VM && vagrant up && vagrant ssh -c "cd /var/www; /bin/bash"
@Mrkisha
Mrkisha / AppKernel.php
Last active November 14, 2015 20:40
Make vagrant run faster
<?php
class AppKernel extends Kernel
{
// ...
public function getCacheDir()
{
if (in_array($this->environment, array('dev', 'test'))) {
return '/dev/shm/appname/cache/' . $this->environment;
# screen
#You SSH into a server, run a command, the internet goes off…profanities all around you!
#Had you used screen, this wouldn’t have happened!
#With screen, you will:
#create a new terminal session with
screen -S executing-long-command
@Mrkisha
Mrkisha / .bashrc
Created February 28, 2016 13:19
Custom linux bashrc
[ -r /etc/bashrc ] && source /etc/bashrc
[ -r /etc/bash_completion ] && source /etc/bash_completion
[ -r ~/.git-completion.bash ] && source ~/.git-completion.bash
[ -r ~/.git-prompt.sh ] && source ~/.git-prompt.sh
[ -r /usr/local/rvm/scripts/rvm ] && source /usr/local/rvm/scripts/rvm
__has_parent_dir () {
# Utility function so we can test for things like .git/.hg without firing up a
# separate process
test -d "$1" && return 0;