Skip to content

Instantly share code, notes, and snippets.

View madebyaleks's full-sized avatar

Aleksander madebyaleks

View GitHub Profile
@madebyaleks
madebyaleks / bysykkel.rb
Created July 21, 2021 13:30
Bysykkel modul til Smashing dashboard
require "httparty"
# Bysykkel ID + navn. Se UIP for liste: https://oslobysykkel.no/apne-data
station01 = '478' # Jernbanetoget
station02 = '424' # Birkelunden
friendly_name_01 = "Jernbanetorget"
friendly_name_02 = "Birkelunden"
obs_identifier = "" # VIKTIG: Bytt med din egen identifier
@madebyaleks
madebyaleks / entur-ticker.rb
Created February 2, 2019 20:29
Entur (Norwegian public transport) for Smashing/Dashing Dashboards.
require "net/http"
require "graphql/client"
require "graphql/client/http"
module ETAPI
api_endpoint = "https://api.entur.org/journeyplanner/2.0/index/graphql"
# stopPlace_id = "NSR:StopPlace:58366" # Jernbanetorget
# stopPlace_id = "NSR:StopPlace:58404" # Nationaltheatret
@madebyaleks
madebyaleks / Branded classes.scss
Last active June 28, 2018 12:28
Makes 'a.<service name>' classes from predefined variables. This class adds a 1px border (with the colour matching the service) below the element, and also changes the text colour and makes the border transparent on hover.Note: This code is based on a example I am unable to locate.
//Base colour. Used when hovering a link.
$base: #242322;
//Colours variables (from brandcolors.net)
$facebook: #3b5998;
$twitter: #00acee;
$linkedin: #0e76a8;