Skip to content

Instantly share code, notes, and snippets.

View cloudify's full-sized avatar
🦄

Federico Feroldi cloudify

🦄
View GitHub Profile

Keybase proof

I hereby claim:

  • I am cloudify on github.
  • I am federicof (https://keybase.io/federicof) on keybase.
  • I have a public key ASCvJpOFi63BuD777kGfpLWQK7dcUjw2eCLnH44C1GZVfQo

To claim this, I am signing this object:

@cloudify
cloudify / Finding User Sessions with SQL
Last active March 11, 2022 14:03 — forked from bstancil/Finding User Sessions with SQL
These queries let you define find user sessions against event data logged to Segment SQL, Snowplow, or Google BigQuery.
-- These queries let you define find user sessions against event data
-- logged to Segment SQL, Snowplow, or Google BigQuery.
-- For more details, see the full post:
-- LINK
--- SEGMENT SQL
-- Finding the start of every session
SELECT *
FROM (
@cloudify
cloudify / cloudformation_ubuntu_1404_trusty_mappings
Created April 21, 2014 11:44
CloudFormation mappings for Ubuntu 14.04 (Trusty)
"Ubuntu1404EbsInstanceType2Arch": {
"c1.medium": {
"Arch": "64"
},
"c1.xlarge": {
"Arch": "64"
},
"cc1.4xlarge": {
"Arch": "64HVM"
},
@cloudify
cloudify / ubuntu_1404_LTS_mappings
Created April 21, 2014 11:40
CloudFormation mappings for Ubuntu 14.04 LTS (Trusty), implemented using Troposphere
t.add_mapping("Ubuntu1404EbsInstanceType2Arch", {
"t1.micro" : { "Arch" : "64" },
"m1.small" : { "Arch" : "64" },
"m1.medium" : { "Arch" : "64" },
"m1.large" : { "Arch" : "64" },
"m1.xlarge" : { "Arch" : "64" },
"m2.xlarge" : { "Arch" : "64" },
"m2.2xlarge" : { "Arch" : "64" },
"m2.4xlarge" : { "Arch" : "64" },
"c1.medium" : { "Arch" : "64" },
@cloudify
cloudify / withJQuery.coffee
Created November 14, 2011 18:22
Coffeescript function that execute some code making sure that jQuery is available (i.e. loading the script if not already included in the page)
# Checks wether jQuery is available, if not it will try to load it
# On success (either jquery already available or successfully loaded), the
# success_cb function gets called with the jQuery object passed as paramenter
# On failure (meaning no jQuery available), the fail_cb is called
withJQuery = (success_cb = (-> true), fail_cb = (-> true), jquery_url = 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js') ->
# create fake console object if the real console is not enabled
console ||=
log: -> true
debug: -> true
@cloudify
cloudify / gemlicenses.rb
Created July 20, 2011 16:36
Find licenses of the gems you're using
#!/usr/bin/ruby
gem_root = '/Users/federico/.rvm/gems/ruby-1.8.7-p330@coderloop/gems'
Dir.open(gem_root) do |dir|
gems = {}
dir.each do |gemfolder|
gemname = gemfolder.match(/^.+-/)
next if gemname.nil?
gemname = gemname[0]