Skip to content

Instantly share code, notes, and snippets.

View carlsednaoui's full-sized avatar

Carl Sednaoui carlsednaoui

View GitHub Profile
carlsednaoui / MailinatorAliases
Last active January 5, 2023 02:39 — forked from nocturnalgeek/MailinatorAliases
A list of alternate domains that point to
View MailinatorAliases
View Evolution of a Ruby Programmer.rb
# Newbie Programmer
def factorial(x)
if x == 0
return 1
return x * factorial(x - 1)
puts factorial(6)
puts factorial(0)
View gist:5177151
alias ls='ls -GFh'
export CLICOLOR=1
# From Andrzej Szelachowski's ~/.bash_profile:
# Note that a variable may require special treatment
#+ if it will be exported.
carlsednaoui / generate_csv.rb
Last active October 6, 2015 12:17 — forked from jescalan/sample.rb
Easily generate a csv file.
View generate_csv.rb
# This is the easiest way to generate a csv and have it downloaded by the user.
# Drop this in a method in the controller and call it on click.
require 'csv'
file = CSV.generate do |csv|
csv << ["Name", "Email"] # headers
Contact.all.each do |person|
csv << [,]