Skip to content

Instantly share code, notes, and snippets.

Robert Casanova robertcasanova

Block or report user

Report or block robertcasanova

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:ce8e37cd5dbdcb18f599
function export_translations() {
php app/console translation:extract de --bundle=$1 --output-dir=./app/Resources/translations --keep --domain=$2
php app/console translation:extract en --bundle=$1 --output-dir=./app/Resources/translations --keep --domain=$2
php app/console translation:extract es --bundle=$1 --output-dir=./app/Resources/translations --keep --domain=$2
php app/console translation:extract fr --bundle=$1 --output-dir=./app/Resources/translations --keep --domain=$2
php app/console translation:extract it --bundle=$1 --output-dir=./app/Resources/translations --keep --domain=$2
php app/console translation:extract pt --bundle=$1 --output-dir=./app/Resources/translations --keep --domain=$2
php app/console translation:extract ru --bundle=$1 --output-dir=./app/Resources/translations --keep --domain=$2
}
@robertcasanova
robertcasanova / translations.json
Created Mar 25, 2015
AirDolomiti site translation labels
View translations.json
{
"en": {
"text.log.in": "Log in",
"text.sign.up": "Sign up",
"text.travel.tips": "Travel tips",
"text.h1": "Flights Air Dolomiti <span class=\"color-primary\">+</span> EXPO tickets",
"text.italy": "Italy",
"text.secure.and.easy.booking": "<span>Secure</span><br />and easy booking",
"text.price.match.guarantee":"<span>Price match</span><br /> guarantee",
"text.immediate.confirmation": "<span>Immediate</span><br /> confirmation",
View gist:5b090600674187da4167
<?php
namespace Musement\UserBundle\Command;
use Musement\FrontendBundle\Export\EventsExport;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
View fled.js
var paper = Raphael(0, 0, 400, 400);
var r = 100;
var steps = 120;
var totLed = 48;
// Sets the fill attribute of the circle to red (#f00)
var circles = [];
// Sets the stroke attribute of the circle to white
var alpha = 0;
View gist:42069c755fbb0826192c
#define BTN_DEBOUCE 20 //ms
ISR(INT0_vect) {
uint16_t timer = 0;
while(bit_is_clear(PIND, PD2)) { // button hold down
timer++; // count how long button is pressed
_delay_ms(1);
}
if(timer > BTN_DEBOUCE) { // software debouncing button
View gist:9482f08b76eece0b1427
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" />
<xsl:template match="schedaold">
<xsl:variable name="categoria" select="@categoria"/>
<xsl:choose>
<xsl:when test="$categoria='Dettaglio'">
<div align="left"><font face="helvetica"><xsl:value-of select=".//valore" disable-output-escaping="yes"/></font></div>
</xsl:when>
<xsl:otherwise>
@robertcasanova
robertcasanova / laserPrinted.dru
Created Jun 29, 2014
Eagle Design Rules for laser printed circuits
View laserPrinted.dru
description[it] = <b>EAGLE Design Rules</b>\n<p>\nThe default Design Rules have been set to cover\na wide range of applications. Your particular design\nmay have different requirements, so please make the\nnecessary adjustments and save your customized\ndesign rules under a new name.
layerSetup = (1*16)
mtCopper = 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm
mtIsolate = 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm 1.5mm
mdWireWire = 0.8mm
mdWirePad = 0.8mm
mdWireVia = 0.8mm
mdPadPad = 0.45mm
mdPadVia = 0.8mm
mdViaVia = 0.8mm
View gist:ba6ff2fddab2d846f766
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "save only",
"linters": {
"csslint": {
View Makefile
##########------------------------------------------------------##########
########## Project-specific Details ##########
########## Check these every time you start a new project ##########
##########------------------------------------------------------##########
MCU = atmega328p
F_CPU = 1000000
BAUD = 9600
## Also try BAUD = 19200 or 38400 if you're feeling lucky.
You can’t perform that action at this time.