- using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
- using inventory:
127.0.0.1 ansible_connection=local
# Python 3 | |
def pprinttable(rows): | |
if len(rows) > 1: | |
headers = rows[0]._fields | |
lens = [] | |
for i in range(len(rows[0])): | |
lens.append(len(max([x[i] for x in rows] + [headers[i]],key=lambda x:len(str(x))))) | |
formats = [] | |
hformats = [] | |
for i in range(len(rows[0])): |
ansible-playbook --connection=local 127.0.0.1 playbook.yml
127.0.0.1 ansible_connection=local
// Removes all items from a page of the Trakt collection | |
// Run script from console of user's collection page | |
// Must be run on each page | |
$(".posters .grid-item").each(function() { | |
actionWatch($(this).closest('.grid-item'), 'collect', true) | |
}) |
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
--- | |
- hosts: localhost | |
gather_facts: False | |
connection: local | |
vars: | |
myvar: 'http://www.example.domain.com:9090' | |
tasks: | |
- name: not as good as a custom filter | |
debug: |
#!/usr/bin/env ruby | |
require 'optparse' | |
require 'octokit' | |
options = {} | |
OptionParser.new do |opt| | |
opt.on('-s', '--secret SECRET', 'GitHub access token') { |o| options[:secret] = o } | |
opt.on('-r', '--repo-slug REPO_SLUG', 'Repo slug. i.e.: apple/swift') { |o| options[:repo_slug] = o } | |
opt.on('-c', '--changelog-file CHANGELOG_FILE', 'Changelog path') { |o| options[:changelog_file] = o } |
echo 'show databases;' | sudo mysql | tail -n+2 | grep -v _schema$ | grep -v ^mysql$ | xargs -n 1 -I _ bash -c 'sudo mysqldump _ | gzip > _.sql.gz' |
SELECT table_schema "Database", | |
Round(Sum(data_length) / 1024 / 1024, 0) "Data size (in MB)", | |
Round(Sum(data_length) / 1024 / 1024 / 1024, 3) "Data size (in GB)", | |
Round(Sum(index_length) / 1024 / 1024, 0) "Index size (in MB)", | |
Round(Sum(index_length) / 1024 / 1024 / 1024, 3) "Index size (in GB)", | |
Round(Sum(data_length + index_length) / 1024 / 1024, 0) "Total size (in MB)", | |
Round(Sum(data_length + index_length) / 1024 / 1024 / 1024, 3) "Total size (in GB)" | |
FROM information_schema.tables | |
GROUP BY table_schema; |
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found
/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
See my blog for more information.
Content: