This assumes you have installed [fzf][1].
$ git branch --no-color | fzf -m | xargs -I {} git branch -D '{}'
Press tab to mark a branch, shift-tab to unmark. Press enter and all marked branches will be deleted.
| #!/bin/bash | |
| # Production Docker Host Hardening Script v2 | |
| # For Ubuntu Server 24.04 LTS (Noble) | |
| # Suitable for both Kamal deployment and builder hosts | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # --- Constants --- |
| # frozen_string_literal: true | |
| # Use super with dynamically defined methods in ruby | |
| class Common | |
| class << self | |
| def attribute(*names) | |
| names.each do |name| | |
| define_method(name) do | |
| attributes[name.to_sym] |
Summarized from https://stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/.
Interestingly, the LXD command line client is named.... lxc!
lxc image list ubuntu: # ubuntu: is officially supported image source
lxc image list images: # images: is an unsupported source
lxc image alias list images: # lists user-friendly names
| export AWS_ACCESS_KEY_ID="YOUR_KEY" | |
| export AWS_SECRET_ACCESS_KEY="YOUR_SECRET" | |
| # See below duplicity options, uses same key for encryption and signing | |
| export PASSPHRASE="YOUR_GPG_KEY_PASSPHRASE" | |
| PURGE_AGE="65D" | |
| # directories, space separated | |
| SOURCE="" |
| 0-mail.com | |
| 0815.ru | |
| 0845.ru | |
| 0clickemail.com | |
| 0wnd.net | |
| 0wnd.org | |
| 10minutemail.com | |
| 10minutemail.net | |
| 12houremail.com | |
| 12minutemail.com |
| 0-mail.com | |
| 0815.ru | |
| 0clickemail.com | |
| 0wnd.net | |
| 0wnd.org | |
| 10minutemail.com | |
| 20minutemail.com | |
| 2prong.com | |
| 30minutemail.com | |
| 3d-painting.com |
| #!/bin/bash | |
| export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY | |
| export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY | |
| export PASSPHRASE=YOU_PASSHRASE | |
| # directories, space separated | |
| SOURCE="/home/thomas/backup /home/thomas/bin /home/thomas/documents" | |
| BUCKET=s3+http://mybucket | |
| LOGFILE=/home/thomas/tmp/duplicity.log | |
| # set email to receive a backup report |
| // This method gives you an easier way of calling super | |
| // when you're using Backbone in plain javascript. | |
| // It lets you avoid writing the constructor's name multiple | |
| // times. You still have to specify the name of the method. | |
| // | |
| // So instead of having to write: | |
| // | |
| // User = Backbone.Model.extend({ | |
| // save: function(attrs) { | |
| // this.beforeSave(attrs); |
| # First configure your models to use Amazon s3 as storage option and setup the associated S3 config. | |
| # Then add the classes your want to migrate in the klasses array below. | |
| # Then run rake paperclip_migration:migrate_to_s3 | |
| # Should work but this is untested and may need some tweaking - but it did the job for me. | |
| namespace :paperclip_migration do | |
| desc "migrate files from filesystem to s3" | |
| task :migrate_to_s3 => :environment do | |
| klasses = [:model_1, :model_2] # Replace with your real model names. If anyone wants to this could be picked up from args or from configuration. | |
| klasses.each do |klass_key| |