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
import { | |
LitElement, | |
html, | |
css, | |
} from "https://unpkg.com/[email protected]/lit-element.js?module"; | |
class MusicGroupCard extends LitElement { | |
static get properties() { | |
return { | |
hass: {}, |
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
#!/bin/bash | |
# Dynamic DNS for CF! | |
# Perfect for updating a single sub domain | |
# Get a record name from the command line e.g: Update.sh taco ; This will update taco.domain.com | |
name=$1 | |
if [ -z "$name" ] | |
then | |
echo "[$(date)] - Record Name Missing, e.g: Update.sh taco ; This will update taco.domain.com" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:content="http://purl.org/rss/1.0/modules/content/"> | |
<channel> | |
<atom:link href="https://static.w00t.cloud/chdfeed.xml" rel="self" type="application/rss+xml"/> | |
<title>Call Her Daddy (archive)</title> | |
<language>en-us</language> | |
<copyright/> | |
<description> | |
<![CDATA[ | |
Call Her Daddy started as a podcast and evolved into a global movement. Alex Cooper bulldozed a |
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
import os, argparse, spotipy, json | |
from spotipy.oauth2 import SpotifyClientCredentials, SpotifyOAuth | |
for env_var in [ | |
"SPOTIPY_CLIENT_ID", | |
"SPOTIPY_CLIENT_SECRET", | |
"SPOTIPY_REDIRECT_URI", | |
]: | |
if os.getenv(env_var, default=None) == None: | |
print(f"Environment variable {env_var} is not set") |
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
wget -O speedtest.tgz https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-x86_64.tgz | |
tar xzf speedtest.tgz | |
mv speedtest /usr/local/bin/speedtest | |
chmod +x /usr/local/bin/speedtest |
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
import boto3 | |
import time | |
def create_new_session(): | |
# Update these with your own values | |
role_arn = 'arn:aws:iam::YOUR_ACCOUNT_ID:role/YOUR_ROLE_NAME' | |
session_name = 'long-running-session' | |
sts_client = boto3.client('sts') | |
response = sts_client.assume_role( |
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
/* I can be compiled with the command "gcc -o dentls dentls.c" */ | |
#define _GNU_SOURCE | |
#include <search.h> /* Defines tree functions */ | |
#include <dirent.h> /* Defines DT_* constants */ | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <unistd.h> | |
#include <stdlib.h> |
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
import json | |
from scipy.optimize import linear_sum_assignment | |
import numpy as np | |
maximize = False # set to true if you want to maximize cost vs minimize (reverse order of preferences) | |
holidays = [ | |
'Memorial', | |
'Independence Day', | |
'Labor', |
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/env python3 | |
import os, yaml, re, argparse, logging, json, subprocess | |
from pathlib import Path | |
def build_docker_compose(args): | |
def append_label(labels, label, value): | |
if label not in labels: | |
labels[label] = 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
<?php | |
$src = $argv[1]; | |
$dest = $argv[2]; | |
if (!$src || !$dest) { | |
die("Need a source and destination"); | |
} | |
$src = rtrim($src, '/') . "/"; |
NewerOlder