Skip to content

Instantly share code, notes, and snippets.

View marmarek's full-sized avatar

Marek Marczykowski-Górecki marmarek

View GitHub Profile
@marmarek
marmarek / icon-receiver.py
Created September 20, 2015 02:15
Window icon updater
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# The Qubes OS Project, http://www.qubes-os.org
#
# Copyright (C) 2013-2015 Marek Marczykowski-Górecki
# <marmarek@invisiblethingslab.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@marmarek
marmarek / gist:b227dcff130862fa5b48
Created October 10, 2015 17:28
openssh-server installed in debian-8 chroot
[user@testvm ~]$ sudo debootstrap jessie $PWD/debian-8 http://ftp.pl.debian.org/debian
(...)
[user@testvm ~]$ sudo chroot debian-8 apt-get install openssh-server
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
krb5-locales libbsd0 libedit2 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libwrap0 libx11-6 libx11-data libxau6
libxcb1 libxdmcp6 libxext6 libxmuu1 ncurses-term openssh-client openssh-sftp-server tcpd xauth
Suggested packages:
krb5-doc krb5-user ssh-askpass libpam-ssh keychain monkeysphere rssh molly-guard ufw
--> Preparing the image
mke2fs 1.42.12 (29-Aug-2014)
Discarding device blocks: 4096/5242880 done
Creating filesystem with 5242880 4k blocks and 1310720 inodes
Filesystem UUID: 4dce36fa-c519-4f73-a064-7afa5c54697e
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Allocating group tables: 0/160 done
--> Preparing the image
mke2fs 1.42.12 (29-Aug-2014)
Discarding device blocks: 4096/5242880 done
Creating filesystem with 5242880 4k blocks and 1310720 inodes
Filesystem UUID: ccc8fac2-e420-4812-8dd4-19c5bda2bb2f
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Allocating group tables: 0/160 done
@marmarek
marmarek / gist:d79382f300331a8f5db2
Created November 8, 2015 02:17
yum install qubes-kernel-vm-support in fedora-21-minimal template
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
qubes-kernel-vm-support x86_64 3.0.11-1.fc21 qubes-vm-r3.0-current
12 k
Installing for dependencies:
binutils x86_64 2.24-32.fc21 updates 5.0 M
busybox x86_64 1:1.19.4-15.fc21 fedora 695 k
cpp x86_64 4.9.2-6.fc21 updates 6.9 M
This file has been truncated, but you can view the full file.
--> Preparing the image
mke2fs 1.42.12 (29-Aug-2014)
Discarding device blocks: 4096/5242880 done
Creating filesystem with 5242880 4k blocks and 1310720 inodes
Filesystem UUID: ef29ae53-bb0f-40cf-9264-de24518e1c5e
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Allocating group tables: 0/160 done
This file has been truncated, but you can view the full file.
--> Preparing the image
mke2fs 1.42.12 (29-Aug-2014)
Discarding device blocks: 4096/5242880 done
Creating filesystem with 5242880 4k blocks and 1310720 inodes
Filesystem UUID: 898d3aff-b78a-49b6-8247-f2ac8ba6a55d
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Allocating group tables: 0/160 done
This file has been truncated, but you can view the full file.
--> Preparing the image
mke2fs 1.42.12 (29-Aug-2014)
Discarding device blocks: 4096/5242880 done
Creating filesystem with 5242880 4k blocks and 1310720 inodes
Filesystem UUID: 71bec9fe-f661-49d4-8308-df2ae83dac45
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Allocating group tables: 0/160 done
This file has been truncated, but you can view the full file.
--> Preparing the image
mke2fs 1.42.12 (29-Aug-2014)
Discarding device blocks: 4096/5242880 done
Creating filesystem with 5242880 4k blocks and 1310720 inodes
Filesystem UUID: e98c045a-5f20-4352-93ab-25262a2ffb21
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Allocating group tables: 0/160 done
@marmarek
marmarek / ssh
Last active February 5, 2016 21:43
salt-ssh qrexec transport hack
#!/bin/sh
id=`date +%s`-$$
echo "Cmd: $0 $@" >>/tmp/log-$id
# redirect stderr to file, but still have ability to send something to the
# "real" stderr
exec 3>&2
exec 2>/tmp/log-$id-stderr