Skip to content

Instantly share code, notes, and snippets.

View sn's full-sized avatar

Sean N sn

View GitHub Profile
@leonardofed
leonardofed / README.md
Last active September 19, 2024 07:07
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@sn
sn / gist:2b9793aecb3a2d62a43c
Created March 7, 2015 19:01
List of countries to use in seeds.rb
Country.create([
{:name => "Afghanistan", :alpha2 => "AF"},
{:name => "Albania", :alpha2 => "AL"},
{:name => "Algeria", :alpha2 => "DZ"},
{:name => "American Samoa", :alpha2 => "AS"},
{:name => "Andorra", :alpha2 => "AD"},
{:name => "Angola", :alpha2 => "AO"},
{:name => "Anguilla", :alpha2 => "AI"},
{:name => "Antarctica", :alpha2 => "AQ"},
{:name => "Antigua and Barbuda", :alpha2 => "AG"},
@mlanett
mlanett / rails http status codes
Last active September 21, 2024 18:10
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@goldshtn
goldshtn / cpp11.cpp
Last active May 8, 2018 01:24
A single function that uses a bunch of C++11/14 features and for "old-school" C++ developers will not even read like C++ anymore.Specifically, it uses:- lambda functions (C++11) with generalized capture semantics (C++14)- rvalue references (C++11)- auto variables (C++11)- decltype and trailing function return type syntax (C++11)- std::move and s…
#include <iostream>
#include <future>
using namespace std;
template <typename Fn, typename... Args>
auto do_async_with_log(ostream& os, Fn&& fn, Args&&... args) ->
future<decltype(fn(args...))>
{
os << "[TID=" << this_thread::get_id()
@sn
sn / mio.rb
Created November 4, 2011 09:12 — forked from macournoyer/mio.rb
mio
#!/usr/bin/env ruby
# mio -- minimalist language inspired by Io for your own careful
# and private delectation w/ friends of the the family,
# if you want to.
# usage:
# mio # starts the REPL
# mio mio_on_rails.mio
# (c) macournoyer
module Mio
class Error < RuntimeError