Skip to content

Instantly share code, notes, and snippets.

View fmquaglia's full-sized avatar
🎯
Focusing

Fabricio Quagliariello fmquaglia

🎯
Focusing
  • Ciudad Autónoma de Buenos Aires, Argentina
View GitHub Profile
class CredentialsController < ApplicationController
def authorize_credentials
redirect_to new_polymorphic_path([current_user, credential_type.new], request.query_parameters)
end
private
def credential_type
Credentials::SalesforceInstanceCredential
def log(message, level= :info, banner= false)
BH.logger.send level, '-'*80 if banner
BH.logger.send level, message
BH.logger.send level, '-'*80 if banner
end
AL: 'Alabama',
AK: 'Alaska',
AZ: 'Arizona',
AR: 'Arkansas',
CA: 'California',
CO: 'Colorado',
CT: 'Connecticut',
DE: 'Delaware',
FL: 'Florida',
GA: 'Georgia',
@fmquaglia
fmquaglia / aifqF.markdown
Created September 6, 2014 02:33
A Pen by Fabricio Quagliariello.
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@fmquaglia
fmquaglia / code.cs
Last active December 21, 2015 12:59
List<string> someStrings = new List<string>() { “hello”, “goodbye”, “thanks”};
int count = someStrings.Count();
int count2 = someString.Count;
@fmquaglia
fmquaglia / NativeSessionStorage.php
Created July 3, 2013 17:34
fix para session started
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@fmquaglia
fmquaglia / .bashrc
Created April 16, 2013 16:23
This is a list of steps to get postgres installed and plugged with rails
### Aliases for postgres
pg_function() {
pg_ctl -D /usr/local/var/postgres -l logfile "$@" ;
}
alias pg="pg_function" # so now you may start and stop postgres using pg start or pg stop
@fmquaglia
fmquaglia / Main.java
Created December 11, 2012 12:35
Ejemplo de cómo usar Regex para encontrar los últimos dígitos en un string
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* User: fabricio
* Date: 12/11/12
* Time: 9:22 AM
*/
public class Main {
public static void main(String[] args) {