This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original: https://github.com/liri/lovelace-themes | |
Google - Light - Fixed: | |
### Fonts ### | |
primary-font-family: "'Open Sans','Rubik',Roboto,sans-serif" | |
paper-font-common-base_-_font-family: "var(--primary-font-family)" | |
paper-font-common-code_-_font-family: "var(--primary-font-family)" | |
paper-font-body_-_font-family: "var(--primary-font-family)" | |
paper-font-subhead_-_font-family: "var(--primary-font-family)" | |
paper-font-headline_-_font-family: "var(--primary-font-family)" | |
paper-font-caption_-_font-family: "var(--primary-font-family)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.7 | |
# coding: utf-8 | |
# Copyright (c) 2019 Unai Uribarri <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Demo / usage of the API endpoint which mvg.de uses itself. | |
Printed example output: | |
['21:58: S8 nach München Flughafen Terminal ', '22:02: S8 nach Weßling(Oberbay) ', '22:22: S8 nach Herrsching '] | |
""" | |
import requests | |
import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@register.inclusion_tag('templatetags/hreflangs.html', takes_context=True) | |
def render_hreflangs(context): | |
""" | |
This templatetag renders hreflang alternate tags for all available languages. | |
It supports CMS pages and detail pages of app hooks | |
The apps detail view needs to have `slug` as last part in the url, eg. /de/produkte-a-z/napura` (slug: napura`) | |
:param context: | |
:return: | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* What? | |
* A JavaScript script that prints out travel times between one origin and multiple targets. | |
* | |
* Example output | |
* $ node apartment-distances.js | |
* Marienplatz, Munich "24 mins" | |
* Google Munich "25 mins" | |
* Jetbrains GmbH, Munich "26 mins" | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var https = require('https'), | |
user = process.argv[2], | |
opts = parseOpts(process.argv.slice(3)) | |
request('/users/' + user, function (res) { | |
if (!res.public_repos) { | |
console.log(res.message) | |
return | |
} | |
var pages = Math.ceil(res.public_repos / 100), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener('touchstart', function onFirstTouch() { | |
// we could use a class | |
document.body.classList.add('user-is-touching'); | |
// or set some global variable | |
window.USER_IS_TOUCHING = true; | |
// or set your app's state however you normally would | |
myFrameworkOfChoice.dispatchEvent('USER_IS_TOUCHING', true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Reads in the export file from FBReader and imports your notes / bookmarkes / quotes to evernote. | |
It's done by sending a mail to your evernote-mail which then creates a note in your default notebook. | |
It creates one evernote note per quote. Each titled with the book title. | |
Additionally, it creates an optional summary note, which contains all quotes from the given book. | |
To use, fill out the settings variables below. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATABASE_NAME=$(cat .env | grep DATABASE_NAME | sed -E 's/(.*)=(.*)/\2/' | xargs); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
""" | |
This script returns the average number of pages of the books on a given Goodreads shelf. | |
Example Output: | |
> $ python3 goodreads_shelf_average_page_number.py | |
Average page number: 354 | |
Number of books in shelf to-read-next with known page numbers: 19/24 | |
Total number of pages in your shelf: 8496 | |
To read that within one year, you need to read 23 pages a day |
NewerOlder