When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
CREATE EXTENSION tablefunc; | |
CREATE TABLE sales(year int, month int, qty int); | |
INSERT INTO sales VALUES(2007, 1, 1000); | |
INSERT INTO sales VALUES(2007, 2, 1500); | |
INSERT INTO sales VALUES(2007, 7, 500); | |
INSERT INTO sales VALUES(2007, 11, 1500); | |
INSERT INTO sales VALUES(2007, 12, 2000); | |
INSERT INTO sales VALUES(2008, 1, 1000); | |
INSERT INTO sales VALUES(2009, 5, 2500); |
[string] $Site = 'https://www.example.com' | |
[string] $ApiKey = '123456' | |
$posts = (Invoke-RestMethod -Uri "$Site/ghost/api/v2/content/posts/?key=$ApiKey").posts.url | |
$posts | Foreach-Object { | |
[PSCustomObject]@{ | |
'Url'=$_ | |
'StatusCode'=(iwr -Uri $_).StatusCode | |
} |
_complete_psql() { | |
services=$(egrep -o '^\[.+\]' ~/.pg_service.conf | cut -f2 -d[ | cut -f1 -d] | sort) | |
if [[ $services ]] | |
then | |
COMPREPLY=( $( compgen -W "$services" -- ${COMP_WORDS[COMP_CWORD]}) ) | |
else | |
echo | |
echo "(no services)" | |
echo -n "> ${COMP_WORDS} " | |
fi |
Function Get-OwnedPW { | |
param( | |
[string] $test | |
) | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$a, $b = (Get-FileHash -A 'SHA1' -I ([IO.MemoryStream]::new([Text.Encoding]::UTF8.GetBytes($test)))).Hash -split '(?<=^.{5})' | |
(((Invoke-RestMethod "https://api.pwnedpasswords.com/range/$a" -UseB) -split '\r\n' -like "$b*") -split ':')[-1] | | |
Foreach-Object { | |
Write-Host -ForegroundColor Green "This has been publically cracked $_ times according to api.pwnedpasswords.com" |
#/bin/bash | |
#Cancels all the flink jobs. Run in the $FLINK_DIR/bin | |
#@Author: Aman Garg | |
echo -e "Cancelling all flink jobs" | |
echo -e "*************************" | |
JOB_LIST=`./flink list | awk {'print $4'} | egrep '^\w+$'` | |
for i in $JOB_LIST |
#!/usr/bin/env python | |
import boto3 | |
import sys | |
import json | |
import time | |
import argparse | |
from termcolor import cprint |
#!/bin/bash | |
# Cleaned up version of ps1_notifications.sh made on 2018-08-05 | |
# | |
# See rybak/scriptps github repository for the full version | |
# link: https://github.com/rybak/scripts/blob/master/config/ps1_notifications.sh | |
# copy of lib/colors.sh instead of calling source "$HOME/scripts/lib/colors.sh" | |
BLACK_FG="$(tput setaf 0)" |
# -*- coding: utf-8 -*- | |
import os | |
import random | |
import requests | |
import json | |
import datetime | |
from fabric.api import * | |
""" |
# Reliable persistent SSH-Tunnel via systemd (not autossh) | |
# https://gist.github.com/guettli/31242c61f00e365bbf5ed08d09cdc006#file-ssh-tunnel-service | |
[Unit] | |
Description=Tunnel for %i | |
After=network.target | |
[Service] | |
User=tunnel | |
ExecStart=/usr/bin/ssh -o "ExitOnForwardFailure yes" -o "ServerAliveInterval 60" -N tunnel@%i |