Skip to content

Instantly share code, notes, and snippets.

Gregorio Setti desmondhume

Block or report user

Report or block desmondhume

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 biggest_product.rb
require 'benchmark'
# Solution 1
def solution_1(list_of_inputs)
.sort { |x, y| x<=>y }
desmondhume / map_to_query_string.ex
Created Aug 6, 2016
Convert elixir map to query string
View map_to_query_string.ex
defmodule URL do
def to_query(input, namespace) do, fn({key, value}) -> parse("#{namespace}[#{key}]",value)end)
|> Enum.join("&")
def to_query(input) do, fn({key, value}) -> parse(key,value) end)
|> Enum.join("&")
desmondhume / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View Ajax single page
function curl_download($Url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $Url);
curl_setopt($ch, CURLOPT_REFERER, "");
curl_setopt($ch, CURLOPT_USERAGENT, "MozillaXYZ/1.0");
View HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install libxml2
/usr/bin/make all-recursive
Making all in include
Making all in libxml
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in .
CC entities.lo
CC encoding.lo
CC error.lo
desmondhume / snippet.html
Created May 7, 2013
Pure css cross-browser arrow
View snippet.html
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<a href="">Scopri<span></span></a>
desmondhume / gist:5510040
Last active Dec 16, 2015
Example of pure css fold on top of a box.
View gist:5510040
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
.badge {
background: green;
width: 200px;
You can’t perform that action at this time.