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;
}
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
async function handleRequest(request) { | |
const response = await fetch("https://csprng.xyz/v1/api?length=10") | |
if (response.status != 200) { | |
return response | |
} |
// | |
// Author: Jonathan Blow | |
// Version: 1 | |
// Date: 31 August, 2018 | |
// | |
// This code is released under the MIT license, which you can find at | |
// | |
// https://opensource.org/licenses/MIT | |
// | |
// |
This is a compilation of information I found in different postings on the net.
tmux
can be invoked in command mode using tmux -CC
. The simplest way to get a remote tmux session into a window of iterm is to invoke it on the remote host
using namespace System.Collections.Concurrent | |
$StartDate = [datetime]::UtcNow | |
# can be generated with something like | |
# 1..10 | %{ Get-Credential} | Export-CliXml -path 'C:\reports\InboxRules\Creds.xml' | |
# Which will prompt for credentials 10 times and store them in the xml file | |
$CredentialFile = 'C:\reports\InboxRules\Creds.xml' | |
$RunDate = $StartDate.ToString('o') -replace ':' | |
# This is the path of the CSV file. It is imperative that this file not be | |
# access while the script is running |
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
$ProgressPreference = 'SilentlyContinue';$Session=New-Object -ComObject 'Microsoft.Update.Session';$Searcher=$Session.CreateUpdateSearcher();$FormatEnumerationLimit=-1;$historyCount=$Searcher.GetTotalHistoryCount(); if ($historyCount -gt 0) {$xx=$($Searcher.QueryHistory(0, $historyCount)|Select-Object Title, Date, Operation, Resultcode|Where-Object {$_.Operation -like 1 -and $_.Resultcode -match '[123]'}| Select-object Title); } else {$xx=$(Get-Hotfix|Where-object {$_.hotfixid -match 'KB\d{6,7}'}| Select-object Hotfixid)}; If ($xx -eq $null) {'WARNING - No updates returned'} else {$xx = $xx|Where-Object {$_ -match 'KB(401221[2-8]|4012598|4012606|4013198|4013429|4015217|4015438|401554[69]|401555[02]|4016635|4019215|401926[34]|4019472)' -or ( $_ -match '^((2017-0[3-9]|2017-1[0-2]|2018-[0-9-){7}|(Ma|A|Ju|[SOND][^ ]+ber).* 2017 |[a-z]{3,10} 201[89] )' -and $_ -match '(Security .*Rollup|Cumulative Update) for Windows')}; If ($xx -eq $null) {'Vulnerable'} else {'Secured - Detected Updates: ' + ($xx | Select-String |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# | |
# Description: Sync Plex playlists to shared users. | |
# Author: /u/SwiftPanda16 | |
# Requires: plexapi | |
from plexapi.exceptions import NotFound | |
from plexapi.server import PlexServer |
This is a guide that I wrote to improve the default security of my website https://fortran.io , which has a certificate from LetsEncrypt. I'm choosing to improve HTTPS security and transparency without consideration for legacy browser support.
I would recommend these steps only if you have a specific need for information security, privacy, and trust with your users, and/or maintain a separate secure.example.com domain which won't mess up your main site. If you've been thinking about hosting a site on Tor, then this might be a good option, too.
The best resources that I've found for explaining these steps are https://https.cio.gov , https://certificate-transparency.org , and https://twitter.com/konklone
#!/bin/bash | |
# TODO: skip tiny files (so small they couldn't be photos) | |
# TODO: make sure sym links and other file system oddities are handled | |
# TODO: look at paralellization for perf boost | |
# | |
# Constants | |
# | |
CHAR_COUNT=12 | |
BLOCK_COUNT=6 |