Skip to content

Instantly share code, notes, and snippets.

@deviantintegral
deviantintegral / root-packages.sh
Created October 2, 2019 15:24
A one-line script that finds installed Debian packages with no reverse dependencies, using multiple processes in parallel
#!/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 ,'
+ 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
{
"_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": [
{
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 August 26, 2016 01:37
Exception with Titanium Backup restore on Nougat
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)
{#
/**
* @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.
uuid: 6036929f-b335-4f24-9003-3bcce7ea2625
langcode: en
status: true
dependencies:
module:
- node
- user
id: split_list
label: 'Split list view'
module: views
<?php
$a = array(
- 'first key' => 'first value',
);
var_dump($a);
var_dump(+"first key");
var_dump(-"first key");
file { '/etc/php5/apache2/conf.d/custom.ini':
ensure => present,
source => '/vagrant/files/apache/etc/php5/apache2/conf.d/custom.ini',
owner => 'root',
group => 'root',
notify => Service['apache2'],
}
# cd /tmp/vagrant-puppet/manifests && FACTER_nfs_www='192.168.100.1:/Users/andrew/vagrant/projects/rome/www' FACTER_apt_proxy='http://192.168.31.42:3142' FACTER_project='rome' puppet apply --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' site.pp --detailed-exitcodes -v
info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/facter_dot_d.rb
info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/puppet_vardir.rb
info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/root_home.rb
warning: notify is a metaparam; this value will inherit to all contained resources
info: Applying configuration version '1367627933'
notice: /Stage[main]/Rome::Apache/Pear::Package[drush]/Package[pear-pear.drush.org-drush]/ensure: ensure changed '5.9.0' to '6.0.0'
info: FileBucket got a duplicate file {md5}c7bc6386a8d56e24b231d0b224969468
info: /Stage[main]/Rome::Apache/File[/etc/php5/apache2/conf.d/custom.ini]: Filebucketed /etc/php5/apache2/conf.d/custom.ini to puppet wit