Skip to content

Instantly share code, notes, and snippets.

Alberto Fernández albertofem

Block or report user

Report or block albertofem

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 keybase.md

Keybase proof

I hereby claim:

  • I am albertofem on github.
  • I am albertofem (https://keybase.io/albertofem) on keybase.
  • I have a public key ASD6XSwOiJyzCUNHJ62tPneAkxM1VZU4GAeGfR_lZvsNpwo

To claim this, I am signing this object:

View redis-copy-network.sh
#!/bin/bash
source_host=localhost
source_port=6379
source_db=0
target_host=localhost
target_port=23123
target_db=0
@albertofem
albertofem / redmine_config.conf
Last active Aug 29, 2015
Redmine VirtualHost configuration
View redmine_config.conf
# Apache 2.2 mod_header
Header always unset "X-Powered-By"
Header always unset "X-Rack-Cache"
Header always unset "X-Content-Digest"
Header always unset "X-Runtime"
PassengerMaxPoolSize 20
PassengerMaxInstancesPerApp 4
PassengerPoolIdleTime 3600
PassengerUseGlobalQueue on
View reflection-benchmark.php
<?php
define('NUM_TESTS', 10);
class Model
{
private $property;
public function getProperty()
{
View bogosort.php
<?php
// usage: php bogosort.php 1,2,3,4,5
$items = explode(",", $argv[1]);
shuffle($items);
$shuffled = 0;
$ordered = bogoSort($items);
@albertofem
albertofem / default.vcl
Last active Aug 29, 2015
Symfony, Varnish, HTTP cache
View default.vcl
backend default
{
.host = "127.0.0.1";
.port = "8080";
}
sub vcl_recv
{
if(req.http.X-Force-Backend)
{
View rest-api-github.txt
curl -i https://api.github.com/users/albertofem/repos
HTTP/1.1 200 OK
Server: GitHub.com
Date: Mon, 31 Mar 2014 10:36:34 GMT
Content-Type: application/json; charset=utf-8
Status: 200 OK
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 56
X-RateLimit-Reset: 1396265742
@albertofem
albertofem / gist:3035119
Created Jul 2, 2012
Complexity Algorithm
View gist:3035119
<?php
$test = array(
"1",
"2",
"3",
"4",
"5",
"6",
"7",
You can’t perform that action at this time.