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
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 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 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 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 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 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, '/') . "/"; |
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
{ | |
"AL": { | |
"name": "Alabama", | |
"capital": "Montgomery", | |
"lat": "32.361538", | |
"long": "-86.279118" | |
}, | |
"AK": { | |
"name": "Alaska", | |
"capital": "Juneau", |
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
<template> | |
<f7-page name="about"> | |
<nav-bar page-title="About" :root-view="rootView"></nav-bar> | |
<f7-block-title>About My App</f7-block-title> | |
<f7-block strong> | |
<p>Fugiat perspiciatis excepturi, soluta quod non ullam deleniti. Nobis sint nemo consequuntur, fugiat. Eius perferendis animi autem incidunt vel quod tenetur nostrum, voluptate omnis quasi quidem illum consequuntur, a, quisquam.</p> | |
<p>Laudantium neque magnam vitae nemo quam commodi, in cum dolore obcaecati laborum, excepturi harum, optio qui, consequuntur? Obcaecati dolor sequi nesciunt culpa quia perspiciatis, reiciendis ex debitis, ut tenetur alias.</p> | |
</f7-block> | |
<f7-block> |
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
<?php | |
$converter = new img2ansi(); | |
$converter->run(); | |
class img2ansi | |
{ | |
private $_image; | |
private $_colors_array = array( | |
"black" => array(0, 0, 0), |
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
version: '2' | |
services: | |
grafana: | |
container_name: grafana | |
image: grafana/grafana | |
volumes: | |
- ${DOCKER_HOME}/grafana/data:/var/lib/grafana | |
- ${DOCKER_HOME}/grafana/config:/etc/grafana | |
influxdb: |
NewerOlder