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
@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) {
@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 / NativeSessionStorage.php
Created July 3, 2013 17:34
fix para session started
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@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;
[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 / aifqF.markdown
Created September 6, 2014 02:33
A Pen by Fabricio Quagliariello.
AL: 'Alabama',
AK: 'Alaska',
AZ: 'Arizona',
AR: 'Arkansas',
CA: 'California',
CO: 'Colorado',
CT: 'Connecticut',
DE: 'Delaware',
FL: 'Florida',
GA: 'Georgia',
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
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
@fmquaglia
fmquaglia / main.rb
Created October 6, 2015 06:16
promising-future example with ost
# See https://github.com/bhuga/promising-future
require "ost"
require "future"
Ost.redis.call('FLUSHDB')
300.times do |i|
Ost[:foo] << i
end