Skip to content

Instantly share code, notes, and snippets.

@iamdey
iamdey / README.md
Last active August 29, 2015 14:13
colorize log

COLORIZE LOG

Installation

  1. copy where you want eg. ~/bin/colorize.sh

    (cd ~/bin/ && wget https://gist.githubusercontent.com/esion/1c68692d4a03f9effd64/raw/dba30293223144e386cc3cf7ccbebac3aa7d8c32/colorize.sh)
    
du -h --max-depth=1 /
@iamdey
iamdey / gist:9021138
Created February 15, 2014 15:50
list open ports & processes
netstat -pln
@iamdey
iamdey / app.js
Created January 21, 2014 11:13
angularJS directives communication
var app = angular.module("app", []);
app.directive("a", function() {
return {
restrict: "A",
controller: function() {
this.Foo = function(msg) {
console.log("foo" + msg);
};
}
@iamdey
iamdey / example.php
Created December 11, 2013 07:52
symfony1 load helpers
<?php
sfContext::getInstance()->getConfiguration()->loadHelpers();
@iamdey
iamdey / DoctrineChoiceType.php
Created March 28, 2013 14:05
Symfony2 form widget mixed between entity & choice
<?php
namespace Acme\DemoBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Doctrine\Bundle\DoctrineBundle\Registry;
use Symfony\Component\OptionsResolver\Options;
use Doctrine\Common\Util\Inflector;
use Symfony\Component\Form\Exception\FormException;
@iamdey
iamdey / A.php
Created March 26, 2013 10:28
Proxy class creation
<?php
namespace Reflected;
use A as Base;
/**
* Proxy class exemple
*
* @author depely
@iamdey
iamdey / post-install.sh
Last active May 14, 2021 04:18
Post install script for my debian based desktop
#!/bin/bash
# gnome shell
# http://askubuntu.com/questions/73030/can-i-get-unity-style-super1-9-keyboard-shortcuts-for-launching-apps-in-gnome
sudo apt-get install gnome-shell wmctrl xbindkeys
cat """
#Terminal
"wmctrl -xa Terminal || terminal"
@iamdey
iamdey / robot.js
Created December 7, 2012 23:08 — forked from Isinlor/robot.js
disabled (isinBot)
/*
* It would be great if you fork & upgrade
* created by; Zolmeister
* edited by: Isinlor
* - added clone
* - upgrade of aim - for cloned robot
* - upgrade of aim - counting missed attack and adaptation
* - upgrade of dodge - move according to the hp
* edited by: type your nickname
* - what you changed - description
@iamdey
iamdey / robot.js
Created December 7, 2012 12:44
vanilla
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);