Skip to content

Instantly share code, notes, and snippets.

View raul782's full-sized avatar

Raul Rodriguez raul782

View GitHub Profile
(function () {
var scheme = (("https:" == document.location.protocol) ? "https" : "http");
var adnxs_domain = 'secure.adnxs.com';
var aol_domain = 'secure.leadback.advertising.com';
var rule = ["*", "*"];
if (scheme=='http') { adnxs_domain = 'ib.adnxs.com'; aol_domain = 'leadback.advertising.com';}
var el = document.createElement("div");
el.style["width"] = "1px";
el.style["height"] = "1px";
el.style["display"] = "inline";
@raul782
raul782 / selenium2-start.sh
Created July 21, 2015 06:04
Selenium2 with Chrome Driver
#Mac/Linux
java -jar bin/selenium-server-standalone-2.46.0.jar -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver &
@raul782
raul782 / chmod-recursively.sh
Created January 21, 2015 18:28
Recursively chmod files and folder
find /path/to/folder -type f -print0 | xargs -I {} -0 chmod 0644 {}
find /path/to/folder -type d -print0 | xargs -I {} -0 chmod 0755 {}
# ~/.gitconfig from @boblet
# initially based on http://rails.wincent.com/wiki/Git_quickstart
[core]
excludesfile = /Users/oli/.gitignore
legacyheaders = false # >git 1.5
quotepath = false
# http://stackoverflow.com/questions/136178/git-diff-handling-long-lines
pager = less -r
# if ↑ doesn’t work, try: pager = less -+$LESS -FRX
@raul782
raul782 / DateRange.php
Last active August 29, 2015 14:07 — forked from havvg/DateRange.php
<?php
namespace Ormigo\Bundle\OrmigoBundle\Form\Model;
use DateTime;
class DateRange
{
/**
* @var DateTime
@raul782
raul782 / pr.md
Last active August 29, 2015 14:06 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

# to install the latest stable version:
brew install scala --with-docs
# to install scala-2.10:
brew install https://raw.github.com/gist/4340744/scala.rb --with-docs
# to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands):
brew switch scala 2.9.2
brew switch scala 2.10.0
@raul782
raul782 / build.sbt
Created February 7, 2013 23:13
SBT template : 2.10 + slick
//
// Copyright 2013 Raul Rodriguez
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
@raul782
raul782 / Sql2005SpanishPlatform.php
Last active December 10, 2015 22:38
Sql2005SpanishPlatform for Doctrine
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
@raul782
raul782 / services.xml
Last active December 10, 2015 14:38
Services.xml example for Symfony2
<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters>
<parameter key="order_distributorMailParser.class">Erp\Bundle\OrderBundle\Services\DistributorMailParser</parameter>