Skip to content

Instantly share code, notes, and snippets.

View gabericharde's full-sized avatar

Gabriel RiCharde gabericharde

  • Berlin, Germany
View GitHub Profile
var bubble = {
"date": Date(),
"title": document.title,
"url": window.location.toString(),
"domain": window.location.hostname,
"meta": [document.querySelector("meta[property='og:type']"), document.querySelector("meta[property='og:description']")]
};
var keyBubbleObj = [bubble.url, bubble];
var bubble = {
"date": Date(),
"title": document.title,
"url": window.location.toString(),
"domain": window.location.hostname,
"meta": [document.querySelector("meta[property='og:type']"), document.querySelector("meta[property='og:description']")]
};
// so we can interact with bubble object in inspector
hash = {a: 10, b: 20, c: 30}
hash.each {|key| puts key}
# for the output of this, i'm getting:
# a
# 10
# b
# 20
# c
puts "Please provide a number between 1 and 10:"
num = gets.chomp!.to_i
if (num < 10) && (num > 1)
string = "#{num} * "
loop do
if num == 1
string.concat("#{num}")
break
end
// Why optionals as a type in Swift? Because Swift dissalows nil values in all other types!
// So the question is, under what circumstances does a value need to be nil?
//: 1. A method that cannot return a value
var y: Int
var s1: String
var s2: String
s1 = "123"
s2 = "ABC"
@gabericharde
gabericharde / dairy_queen_landing_page.markdown
Last active February 7, 2016 16:34
dairy_queen_landing_page
@gabericharde
gabericharde / dice_roller.markdown
Last active February 7, 2016 16:35
dice_roller