Skip to content

Instantly share code, notes, and snippets.

@devbevans
devbevans / mount_xen_vdi.md
Created July 12, 2021 18:22 — forked from r4um/mount_xen_vdi.md
Mount disk under Xen dom0
  • Get name label and hypervisor of the disk, login to the hypervisor
# xe vdi-list name-label=ROOT-892
uuid ( RO)                : 5948fee1-28a4-4d37-a38d-cda7527b366d
          name-label ( RW): ROOT-892
    name-description ( RW):
             sr-uuid ( RO): d3a28e40-b840-556a-596f-e5e8412edd81
        virtual-size ( RO): 289910292480
            sharable ( RO): false
"########################################################
" original src: https://github.com/skwp/dotfiles/blob/master/vimrc
"########################################################
set nocompatible
set shell=bash
if &diff == 'nodiff'
set shellcmdflag=-ic
[alias]
b = branch
br = branch
ba = branch -a
brbe = !git branch -av | grep 'remotes/bevans/'
bav = branch -avv
brv = branch -vv
brvv = branch -vv
ci = commit
co = checkout
@devbevans
devbevans / paramiko-using-ssh-config.py
Created March 1, 2018 00:10 — forked from acdha/paramiko-using-ssh-config.py
Connecting with paramiko using the user's OpenSSH config
client = paramiko.SSHClient()
client._policy = paramiko.WarningPolicy()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh_config = paramiko.SSHConfig()
user_config_file = os.path.expanduser("~/.ssh/config")
if os.path.exists(user_config_file):
with open(user_config_file) as f:
ssh_config.parse(f)
@devbevans
devbevans / ec2_show_next_billhour.py
Created January 17, 2018 22:41
Estimate how many minutes remain before next EC2 billing hour.
#!/usr/bin/env python
import boto3
from datetime import datetime
ec2 = boto3.resource('ec2')
instances = ec2.instances.filter(Filters=[{'Name': 'instance-state-name', 'Values': ['running']}])
#!/bin/bash
#
# SDK Tools
# Please refer to https://dl.google.com/android/repository/repository2-1.xml
#
# This is where all the links for the latest SDK Tools will be
# https://dl.google.com/android/repository/sdk-tools-linux_3952940.zip
#
#
## ---- Example project.properties
@devbevans
devbevans / fc20cb_patches.sh
Created September 8, 2014 01:13
Fedora 20 Chromebook patches
#!/bin/bash
# BE: script donwloaded from https://bugzilla.redhat.com/show_bug.cgi?id=1045821
# Modified for Arch Linux from ChrUbuntu's cros-haswell-modules.sh
# https://googledrive.com/host/0B0YvUuHHn3MndlNDbXhPRlB2eFE/cros-haswell-modules.sh
# + touchpad:
# original cros-haswell-modules.sh by Jay Lee http://goo.gl/kz917j
# updated to support c720p touchscreen by motley.slate@gmail.com
# updated to support als system - Yannick@ekiga
# This script is designed for Fedora 20
# Changelog: