This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
#!/bin/sh | |
#takes one argument/parameter: the name of the package which didn't install correctly and should be removed along with its dependencies | |
#do opkg update first | |
#example: ./opkgremovepartlyinstalledpackage.sh pulseaudio-daemon | |
#get list of all packages that would be installed along with package x | |
opkg update | |
PACKAGES=`opkg --force-space --noaction install $1 | grep http | cut -f 2 -d ' ' | sed 's/.$//'` | |
for i in $PACKAGES | |
do |
options.timeout = 20 | |
options.subscribe = true | |
account1 = IMAP { | |
server = 'server', | |
username = 'username', | |
password = 'password', | |
} | |
# vim: set ft=pf | |
# /etc/pf.conf | |
ext_if="vtnet0" | |
webports = "{http, https}" | |
int_tcp_services = "{domain, ntp, smtp, www, https, ftp}" | |
int_udp_services = "{domain, ntp}" | |
set skip on lo |
### Last tested February 7 2014 on a Galaxy S3 (d2att) running Cyanogenmod 11 nightly, with Google Authenticator 2.49. | |
### Device with Google Authenticator must have root. | |
### Computer requires Android Developer Tools and SQLite 3. | |
### Connect your device in USB debugging mode. | |
$ cd /tmp | |
$ adb root | |
$ adb pull /data/data/com.google.android.apps.authenticator2/databases/databases |
Recommendations of unit types per media type:
Media | Recommended | Occasional use | Infrequent use | Not recommended |
---|---|---|---|---|
Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
# [PackageDev] target_format: plist, ext: tmLanguage | |
# Made by Wout.Mertens@gmail.com | |
# This grammar tries to be complete, but regex-based highlighters | |
# can't be full parsers. Therefore it's a bit looser than the Nix | |
# parser itself and some legal constructs will be marked as illegal. | |
# It seems to work fine for nixpkgs. | |
# Cute hacks: Check out the attrset-for-sure and friends definitions | |
--- | |
name: Nix | |
scopeName: source.nix |
#!/bin/bash | |
# | |
# converts hard-links to symbolic links | |
# | |
#-------------- Author: -------------# | |
# by Ruben Barkow | |
# git: https://gist.github.com/7a9a83695a28412abbcd.git | |
#--- Copyright and license -----------# | |
#This code is covered by the GNU General Public License 3. |
import requests | |
from bs4 import BeautifulSoup | |
with open('urls','w') as f: | |
while True: | |
r = requests.get("https://login.corp.google.com/") | |
soup = BeautifulSoup(r.text) | |
src = soup.find("img","login-image")['src'] | |
print(src) | |
f.write(src+"\n") |
PGP can refer to two things:
The Pretty Good Privacy software originally written by Phil Zimmermann, and now owned by Symantec. The formats for keys, encrypted messages and message signatures defined by that software. These have now been formalised as the OpenPGP standard. The GPG software is an independent implementation of the OpenPGP standards, so you can use it to exchange encrypted messages with people using other OpenPGP implementations (e.g. Symantec's PGP).