Skip to content

Instantly share code, notes, and snippets.

View emgiezet's full-sized avatar
:octocat:
Working from home

Max Małecki emgiezet

:octocat:
Working from home
View GitHub Profile
@emgiezet
emgiezet / gist:2115262
Created March 19, 2012 14:57
Finding variables in the twig templates inside the { trans } blocks
ack-grep '({ trans }+(.*)?)+{{ (.*) }}+((.*)?{ endtrans })' --type-set twig=.twig
@emgiezet
emgiezet / gist:2115402
Created March 19, 2012 15:01
Finding count($variable) in the if statements in php code
ack-grep "(if\(([\w\s])?count\()(.*)(\))(([\w\s])?(>)[\w\s])[\d]([\w\s])?(\))"
@emgiezet
emgiezet / radeon_gpu_teperature_logger.sh
Created November 24, 2012 20:55
radeon gpu teperature logger
#!/bin/bash
function console_mode
{
echo -e "\033[30;42mPress Ctrl-C to break ...\033[0m"
while true; do
get_gpu
## gpu usage
@emgiezet
emgiezet / robot.js
Created December 4, 2012 10:04
DumbCracker
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
robot.clone();
robot.turn(45);
this.offset = 1;
};
Robot.prototype.onIdle = function(ev) {
@emgiezet
emgiezet / robot.js
Created December 4, 2012 10:52 — forked from nelsonmarcos/robot.js
Merry Go round
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot){
robot.clone();
robot.turn(45);
this.offset = 1;
};
Robot.prototype.onIdle = function(ev) {
@emgiezet
emgiezet / robot.js
Created December 4, 2012 11:11 — forked from randompast/robot.js
QR-bot-001
//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(5);
robot.turn(5);
@emgiezet
emgiezet / robot.js
Created December 4, 2012 12:43 — forked from drapello/robot.js
seeker
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot){
robot.clone();
robot.turn(45);
this.offset = 1;
};
Robot.prototype.onIdle = function(ev) {
@emgiezet
emgiezet / robot.js
Created December 4, 2012 14:40
[CAELUM TEAM]Megatron
//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.clone();
@mixin respond-to($media) {
@if $media == phone {
@media (max-width: 767px) { @content; }
}
@if $media == except-phone {
@media (min-width: 768px) { @content; }
}
@if $media == tablet {
@media (min-width: 768px) and (max-width: 979px) { @content; }
}
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
wget https://github.com/elasticsearch/elasticsearch/archive/v0.20.1.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share