Suppose you have weird taste and you absolutely want:
- your visual selection to always have a green background and black foreground,
- your active statusline to always have a white background and red foreground,
- your very own deep blue background.
type Unpacked<T> = | |
T extends (infer U)[] | |
? U | |
: T extends (...args: any[]) => infer U | |
? U | |
: T extends Promise<infer U> | |
? U | |
: T |
FROM golang:alpine as builder | |
WORKDIR /app | |
#the following 2 steps are optional if your image does not already have the certificate | |
# package installed, golang:alpine now seems to have it. But a more base image could be missing it. | |
#RUN apk update && apk upgrade && apk add --no-cache ca-certificates | |
#RUN update-ca-certificates | |
ADD main.go /app/main.go | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags="-s -w" -installsuffix cgo -o app . | |
FROM scratch |
# Useful references: | |
# | |
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line | |
# https://ss64.com/vb/sendkeys.html | |
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell | |
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/ | |
# | |
# Future enhancements - use events rather than an infinite loop | |
$wsh = New-Object -ComObject WScript.Shell | |
while (1) { |
cd "C:\Program Files (x86)\Windows Photo Viewer" | |
regsvr32 PhotoAcq.dll | |
regsvr32 PhotoViewer.dll |
Suppose you have weird taste and you absolutely want:
/** | |
* Labels Gmail email threads | |
*/ | |
function labelGithubEmails() { | |
/** | |
* Gmail label names for GitHub messages | |
*/ | |
const githubLabelName = 'GitHub' | |
const githubPullRequestLabelName = 'GitHub/Pull Request' | |
const githubIssueLabelName = 'GitHub/Issue' |
Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.
The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from
Product: Sagitta Brutalis 1080 (PN S3480-GTX-1080-2697-128)
Software: Hashcat v3.00-beta-145-g069634a, Nvidia driver 367.18
Accelerator: 8x Nvidia GTX 1080 Founders Edition
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Here is where you can register all of the routes for an application. | |
| It's a breeze. Simply tell Laravel the URIs it should respond to | |
| and give it the controller to call when that URI is requested. |
# Get the size meta of every accessible schema | |
SELECT | |
count(*) tables, | |
`table_schema`, | |
format(sum(`table_rows`)/1000000, 3) `rows (M)`, | |
format(sum(`data_length`)/(1024*1024*1024), 3) `data_size (GB)`, | |
format(sum(`index_length`)/(1024*1024*1024), 3) `index_size (GB)`, | |
format((sum(`data_length`+`index_length`))/(1024*1024*1024), 3) `total_size (GB)`, | |
format(sum(`index_length`)/sum(`data_length`), 3) `index_data_ratio` | |
FROM |