This file contains hidden or 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
#ifndef VT_SPACE_AGE_HPP | |
#define VT_SPACE_AGE_HPP | |
/// copyright 2019-2021 viraltaco_ <https://opensource.org/licenses/MIT> | |
namespace /*(anonymous)*/ { | |
namespace space_age::inline detail { | |
template <class T> struct [[nodiscard]] getter { | |
constexpr auto operator ()() const noexcept { return value; } | |
const T value; | |
}; |
This file contains hidden or 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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/taco/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
This file contains hidden or 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
function age(bdate) { | |
const dateNow = Date.now() | |
const birthday = new Date(bdate) | |
if (birthday > dateNow) { | |
return NaN | |
} else { | |
const difference = new Date(dateNow - birthday) | |
return difference.getFullYear() - 1970 | |
} |
This file contains hidden or 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/php | |
<? | |
# get api key here: https://www.last.fm/api/account/create | |
$api_key = "API_KEY_HERE"; | |
$user = "HANDLE_HERE"; # case sensitive | |
$method = "method=user.getrecenttracks&user="; | |
$path = "http://ws.audioscrobbler.com/2.0/?"; | |
$key = "&api_key=".$api_key; |
This file contains hidden or 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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |