A few examples from MediaWiki/Wikipedia API.
(see https://www.mediawiki.org/w/api.php?action=help&modules=query)
# Certbot can be a bit tedious, but it's easy to automate a one-liner non-interactive. Substitute your own domain and email below. | |
sudo service apache2 stop && sudo certbot --apache -d example.com -m [email protected] --non-interactive --agree-tos && sudo service apache2 start |
A few examples from MediaWiki/Wikipedia API.
(see https://www.mediawiki.org/w/api.php?action=help&modules=query)
Here I'm interested in a use case of subscribers keeping a permanent connection open (24/7), but with negligible amount of messages. So I'm only concerned about price per connection, not price per message.
https://aws.amazon.com/api-gateway/pricing/
$0.25 per million connection minutes
That's $1 per 4 million connection minutes.
Since v8.1 (May 2018), Vim has shipped with a built-in terminal. See https://vimhelp.org/terminal.txt.html or type :help terminal
for more info.
Why use this? Mainly because it saves you jumping to a separate terminal window. You can also use Vim commands to manipulate a shell session and easily transfer clipboard content between the terminal and files you're working on.
A wrapper for pwgen. Put this in your ~/.bashrc to generate a long & strong password. You can append an optional message to remind yourself of the purpose if you can't immediately transfer it to a credentials repository.
Example usage:
$ hardpass
ZzVMh:u(?ln134`q&PW9rmM0h]rRQ6p-#tv\3I.7
$ hardpass
OXX]k%e1/o-njU0XIK'UT@=\,9OeUGOr
$ hardpass new twitter password
### new twitter password
Script to split mbox file, adapted from https://stackoverflow.com/questions/28110536/how-to-split-an-mbox-file-into-n-mb-big-chunks-using-the-terminal
USAGE
awk -f splitmbox.awk ~/.thunderbird/1234abcd.default/IMapMail/mail.example.com/INBOX
### Keybase proof | |
I hereby claim: | |
* I am mahemoff on github. | |
* I am mahemoff (https://keybase.io/mahemoff) on keybase. | |
* I have a public key ASAG4tJDQ2HpifE_ViR49cBZWw75E2MeiYX5PpTpxoJADgo | |
To claim this, I am signing this object: | |
```json | |
{ | |
"body": { | |
"key": { |
This is a JSON sample you can use for Wikidata-processing scripts to simulate the full dump.
The version here is useful for testing as it's smaller, uncompressed, and not subject to change.
See Wikidata license at https://www.wikidata.org/wiki/Wikidata:Database_download#JSON_dumps_(recommended)
#!/usr/bin/env ruby | |
require 'benchmark' | |
require 'active_support/all' | |
puts 'in', Benchmark.measure { 90000.in?(1..99000)} | |
puts 'include', Benchmark.measure { (1..99000).include? 90000 } |
taxiing
spoiler for https://twitter.com/julianharris/status/1155051906110251008 -