Skip to content

Instantly share code, notes, and snippets.

View alip's full-sized avatar

Ali Polatel alip

View GitHub Profile
lasker ~ # eclectic gcc list
Available providers for gcc:
[1] 8
[2] 7 *
[3] 6
[4] 5.1
@alip
alip / flatten.rb
Created June 16, 2016 07:40
Flatten array without Array#flatten
#!/usr/bin/env ruby
# coding: utf-8
def flatten(array)
Array.new.tap do |flat_array|
array.each do |item|
case item
when Numeric
flat_array << item
when Enumerable
### Keybase proof
I hereby claim:
* I am alip on github.
* I am alip (https://keybase.io/alip) on keybase.
* I have a public key whose fingerprint is 998D A2FF 5D7D 798B 3945 A40E 414E 3239 1845 F220
To claim this, I am signing this object:
From 072fdfa7679f17193afb5d0704ba3792679ce115 Mon Sep 17 00:00:00 2001
Message-Id: <072fdfa7679f17193afb5d0704ba3792679ce115.1308556182.git.polatel@gmail.com>
From: Ali Polatel <[email protected]>
Date: Thu, 31 Mar 2011 14:17:46 +0300
Subject: [PATCH] initial attempt at documenting esandbox
Organization: Pink Floyd
---
eapi/exheres-for-smarties.mkd | 117 ++++++++++++++++++++++++++++++++++------
1 files changed, 99 insertions(+), 18 deletions(-)