Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Berry deviantintegral

View GitHub Profile
View gist:8f0ab203eec69e4cd8ba65b77c943d65
==> d8: Forcing shutdown of VM...
==> d8: Destroying VM and associated drives...
Bringing machine 'd8' up with 'virtualbox' provider...
==> d8: Importing base box 'laravel/homestead'...
==> d8: Matching MAC address for NAT networking...
==> d8: Checking if box 'laravel/homestead' version '9.3.0' is up to date...
==> d8: Setting the name of the VM: d8
==> d8: Clearing any previously set network interfaces...
==> d8: Preparing network interfaces based on configuration...
d8: Adapter 1: nat
View zfs-unlock
#!/bin/sh
# Place this in /etc/initramfs-tools/scripts/init-premount/zfs-unlock and
# run update-initramfs -u to include the script.
#
# This initramfs script handles mounting encrypted pools from a keyfile
# and not a passphrase. The main use case is keeping datasets encrypted so
# disks can be safely discarded if they partially fail and can't be easily
# wiped.
#
@deviantintegral
deviantintegral / root-packages.sh
Created Oct 2, 2019
A one-line script that finds installed Debian packages with no reverse dependencies, using multiple processes in parallel
View root-packages.sh
#!/bin/sh
# This list may not be sorted, so if that is desired be sure to pipe the output through sort.
dpkg -l | \
grep '^ii' | \
awk '{ print $2 }' | \
xargs -P4 -I, /bin/sh -c '[ "$(apt-cache rdepends --installed , | wc -l)" = "2" ] && echo ,'
View gist:fa0dc9b6811bac791f9478f69522f796
+ set -eu
+ set -o pipefail
+ SOCKET=/var/tmp/mysql.sock
+ '[' 2 = 2 -a restore_snapshot = restore_snapshot ']'
+ snapshot_dir=/mnt/ddev_config/db_snapshots/d8_20190306102657
+ '[' -d /mnt/ddev_config/db_snapshots/d8_20190306102657 ']'
+ echo 'Restoring from snapshot directory /mnt/ddev_config/db_snapshots/d8_20190306102657'
+ sudo rm -rf /var/lib/mysql/aria_log.00000001 /var/lib/mysql/aria_log_control /var/lib/mysql/db /var/lib/mysql/db_mariadb_version.txt /var/lib/mysql/ib_buffer_pool /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile1 /var/lib/mysql/ibdata1 /var/lib/mysql/multi-master.info /var/lib/mysql/mysql /var/lib/mysql/on.000001 /var/lib/mysql/on.000002 /var/lib/mysql/on.index /var/lib/mysql/on.state /var/lib/mysql/performance_schema /var/lib/mysql/test /var/lib/mysql/xtrabackup_info
Restoring from snapshot directory /mnt/ddev_config/db_snapshots/d8_20190306102657
++ id -g
View composer.lock
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "c87659890d6c4cbedd3e2b6c428f186f",
"content-hash": "364e07deb122e4b9b03c6ad844c06fdf",
"packages": [
{
View -
Installing packages for development tools...
Get:1 http://httpredir.debian.org wheezy Release.gpg [2373 B]
Get:2 http://httpredir.debian.org wheezy-updates Release.gpg [1554 B]
Get:3 http://httpredir.debian.org wheezy Release [191 kB]
Get:4 http://httpredir.debian.org wheezy-updates Release [151 kB]
Get:5 http://security.debian.org wheezy/updates Release.gpg [1554 B]
Get:6 http://security.debian.org wheezy/updates Release [39.0 kB]
Get:7 http://httpredir.debian.org wheezy/main amd64 Packages [7634 kB]
Get:8 http://security.debian.org wheezy/updates/main amd64 Packages [547 kB]
Get:9 http://httpredir.debian.org wheezy-updates/main amd64 Packages [7481 B]
@deviantintegral
deviantintegral / gist:6689160b9f89d67f53b179470e5223af
Created Aug 26, 2016
Exception with Titanium Backup restore on Nougat
View gist:6689160b9f89d67f53b179470e5223af
08-25 21:01:36.768 E/o.I (26169): IO exception during data restore.
08-25 21:01:36.768 E/o.I (26169): java.io.IOException: write failed: EPIPE (Broken pipe)
08-25 21:01:36.768 E/o.I (26169): at libcore.io.IoBridge.write(IoBridge.java:501)
08-25 21:01:36.768 E/o.I (26169): at java.io.FileOutputStream.write(FileOutputStream.java:316)
08-25 21:01:36.768 E/o.I (26169): at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
08-25 21:01:36.768 E/o.I (26169): at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
08-25 21:01:36.768 E/o.I (26169): at java.io.FilterOutputStream.write(FilterOutputStream.java:97)
08-25 21:01:36.768 E/o.I (26169): at javax.crypto.CipherOutputStream.write(CipherOutputStream.java:120)
08-25 21:01:36.768 E/o.I (26169): at o.ᔲ.run(Source:53)
08-25 21:01:36.768 E/o.I (26169): Caused by: android.system.ErrnoException: write failed: EPIPE (Broken pipe)
View views-view-unformatted--split_list.html.twig
{#
/**
* @file
* Default theme implementation to display a view of unformatted rows.
*
* Available variables:
* - title: The title of this group of rows. May be empty.
* - rows: A list of the view's row items.
* - attributes: The row's HTML attributes.
* - content: The row's content.
View views.view.split_list.yml
uuid: 6036929f-b335-4f24-9003-3bcce7ea2625
langcode: en
status: true
dependencies:
module:
- node
- user
id: split_list
label: 'Split list view'
module: views
You can’t perform that action at this time.