Skip to content

Instantly share code, notes, and snippets.

View damienh's full-sized avatar

Damien Hogan damienh

  • Cytiva
  • United Kingdom
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ProjectName – Code Club</title>
<link rel="stylesheet" href="/assets/main-2a7e0e242618c238cd73c2ad7280dec6.css">
[
{
"id": "scratch",
"name": "Scratch",
"img": "scratch.png",
"desc": "Learn how to program your own interactive stories, games and animations.",
"long_desc": "Scratch is a graphical programming language, developed by the Lifelong Kindergarten group at the Massachusetts Institute of Technology. Children can drag and combine code blocks to make a range of programs, including animations, stories, musical instruments and games. It’s a bit like the programming equivalent of Lego!"
},
{
@damienh
damienh / gist:16d249c5ea686abb21ae
Last active August 29, 2015 14:22
EB v3 params
def event_params
event_params = ({:event => {
:name => {
:html => event.name # this will be a string e.g "Public Event with Damien Hogan"
},
:description => {
:html => event.description # this will be a string e.g "This event is going to cover the following modules..."
},
:organizer_id => ORGANIZER_ID, # ENV variable stored in a Constant.
:start => {
@damienh
damienh / gist:d41e87e8310a4ab5b029
Last active August 29, 2015 14:22
EB v3 Calls
def create_event
begin
response = Http::Exceptions.wrap_and_check do
HTTParty.post("https://www.eventbriteapi.com/v3/events/",
:body => event_params,
:headers => {'Content-Type' => 'application/json', 'Authorization' => AUTH } )
end
@returned_event = JSON.parse(response.body)
rescue Http::Exceptions::HttpException => e
@damienh
damienh / gist:b5953e742aaeb2f7f32f
Last active August 29, 2015 14:20
EB API Request
auth = "Bearer OMITTED"
response = HTTParty.post("https://www.eventbriteapi.com/v3/events", body: {:event => {
:name => {
:html => "Event Name"
},
:organizer_id => "6272138773",
:start => {
:timezone => "America/Los_Angeles",
:utc => "2015-05-12T02:00:00Z",
},