Skip to content

Instantly share code, notes, and snippets.

View espeon's full-sized avatar
:octocat:
octo cat

natalie espeon

:octocat:
octo cat
View GitHub Profile
@espeon
espeon / cool.js
Created September 23, 2020 07:39
function onYouTubeIframeAPIReady(){var e=document.getElementById("youtube-audio"),t=document.createElement("img");t.setAttribute("id","youtube-icon"),t.style.cssText="cursor:pointer;cursor:hand",e.appendChild(t);var a=document.createElement("div");a.setAttribute("id","youtube-player"),e.appendChild(a);var o=function(e){var a=e?"b.png":"b.png";t.setAttribute("src","https://co.uk/"+a)};e.onclick=function(){r.getPlayerState()===YT.PlayerState.PLAYING||r.getPlayerState()===YT.PlayerState.BUFFERING?(r.pauseVideo(),o(!1)):(r.playVideo(),o(!0))};var r=new YT.Player("youtube-player",{height:"0",width:"0",videoId:e.dataset.video,playerVars:{autoplay:e.dataset.autoplay,loop:e.dataset.loop},events:{onReady:function(e){r.setPlaybackQuality("small"),o(r.getPlayerState()!==YT.PlayerState.CUED)},onStateChange:function(e){e.data===YT.PlayerState.ENDED&&o(!1)}}})}
const express = require("express");
const fs = require("fs");
const app = express();
function isValidURL(string) {
var res = string.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);
return (res !== null && string.includes(".gif"))
};
app.get("/api/pika/", (req, res) => {
version: '3.7'
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.1.6
# Enables the web UI and tells Traefik to listen to docker
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.https.address=:443"
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;previous song
F13::
Send {Media_Prev}
return

Keybase proof

I hereby claim:

  • I am kanbaru on github.
  • I am emmais (https://keybase.io/emmais) on keybase.
  • I have a public key ASA63JIOd9m-rVJeN8ikgXV8yj8jLa__ys47Mi3DdDCX4Qo

To claim this, I am signing this object:

[{"lat":25.03737,"lon":121.56355,"temp":{"value":32.35,"units":"C"},"precipitation":{"value":1.728,"units":"mm/hr"},"precipitation_type":{"value":"rain"},"precipitation_probability":{"value":40,"units":"%"},"feels_like":{"value":36.82,"units":"C"},"humidity":{"value":56.5,"units":"%"},"wind_speed":{"value":2.88,"units":"m/s"},"wind_direction":{"value":71.51,"units":"degrees"},"cloud_cover":{"value":61,"units":"%"},"weather_code":{"value":"rain_light"},"observation_time":{"value":"2020-08-29T03:00:00.000Z"}},{"lat":25.03737,"lon":121.56355,"temp":{"value":32.05,"units":"C"},"precipitation":{"value":2.34,"units":"mm/hr"},"precipitation_type":{"value":"rain"},"precipitation_probability":{"value":40,"units":"%"},"feels_like":{"value":36.77,"units":"C"},"humidity":{"value":58.6,"units":"%"},"wind_speed":{"value":3.22,"units":"m/s"},"wind_direction":{"value":79.17,"units":"degrees"},"cloud_cover":{"value":71,"units":"%"},"weather_code":{"value":"rain_light"},"observation_time":{"value":"2020-08-29T04:00:00.000Z"}},
[
{
"time": 13.2,
"text": "Expensive tickets to a crowded place"
},
{
"time": 17.56,
"text": "Someone who you can't relate to calls your name"
},
{
@espeon
espeon / player.waveline.app.css
Last active July 26, 2020 02:57
waveline player css so it looks slightly better or something
@-moz-document domain("player.waveline.app") {
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700&family=Noto+Sans+JP:wght@100;300;400&display=swap');
*, :after, :before, button, button:focus, input, textarea, body, html, h1, h2, h3, h4, h5 {
font-family: 'Inter', 'Noto Sans JP', 'Open Sans', feather, sans-serif;
}
.button:hover {
color: #fff;
background-color: #4caf50!important;
}
@espeon
espeon / docker-compose.yaml
Last active July 24, 2020 03:07
docker-compose with postgres and pgbouncer
services:
postgres:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: PASsWORD
volumes:
- ./pg_data:/var/lib/postgresql/data
ports:
- "5432:5432"

Keybase proof

I hereby claim:

  • I am notkanbaru on github.
  • I am emmais (https://keybase.io/emmais) on keybase.
  • I have a public key ASAYDvhu3y0boeR5VPV1wbEoL3EHb0ceBBMLIIS8PcPXoQo

To claim this, I am signing this object: