Skip to content

Instantly share code, notes, and snippets.

View brianherman's full-sized avatar
💭
Yay

brian herman brianherman

💭
Yay
  • A Cons Apart
  • Chicago, Illinois
View GitHub Profile
FROM brianherman/devbase
RUN apt-get update
RUN apt-get -y install openssh-server vim htop screen
# For debugging
RUN apt-get -y install sudo wget curl telnet tcpdump
# For 32-bit experiments
RUN apt-get -y install gcc-multilib
@brianherman
brianherman / vmware convert
Created May 30, 2015 03:32
How to Convert Windows 2008 R2 KVM Image to qemu
You can run System Preparation (Sysprep) on your Windows Server 2008 or Windows Server 2012 VM images before or after they are imported. If you run Sysprep before importing your VM, the importation process adds an answer file (unattend.xml) to the VM that automatically accepts the End User License Agreement (EULA) and sets the locale to EN-US. If you choose to run Sysprep after importation, we recommend that you use the Amazon EC2 Config service to run Sysprep.
To include your own answer file instead of the default (unattend.xml):
Copy the sample unattend.xml file below and set the processorArchitecture parameter to x86 or amd64, depending on your OS architecture:
<?xml version='1.0' encoding='UTF-8'?>
<unattend xmlns:wcm='http://schemas.microsoft.com/WMIConfig/2002/State' xmlns='urn:schemas-microsoft-com:unattend'>
<settings pass='oobeSystem'>
<component versionScope='nonSxS' processorArchitecture='x86 or amd64' name='Microsoft-Windows-International-Core' publicKeyToken='31bf3856ad3
def New_User(self,policy_id=None, token = None, email=None, password = None, domain=None):
if policy_id:
url2 = "http://uicesv08business/Diamond/BillingService.svc?wsdl"
client = SoapClient112(wsdl=self.URL_billing,ns="tem", cache="cache_billingservice")
if policy_id:
r3 = {
'DiamondSecurityToken': token,
'RequestData': {
'PolicyId': policy_id,
Dim encoder As New System.Text.ASCIIEncoding()
Dim md5Hasher As New System.Security.Cryptography.MD5CryptoServiceProvider()
Dim Password as String = encoder.GetString(md5Hasher.ComputeHash(encoder.GetBytes(PasswordInsTextBox.Text)))
import sys
import cPickle
from PyQt4.QtCore import *
from PyQt4.QtGui import *
data = {'root': {'persons': {'person': [{'name': {'last': 'bar', 'first': 'foo'}}, {'name': {'last': 'bar', 'first': 'baz'}}]}}}
def fill_item(item, value):
item.setExpanded(True)
@brianherman
brianherman / VLC_jessie_backports.md
Last active November 9, 2016 02:24
Debian on jessie backports/

This is a guide to get the latest vlc to work on jessie backports.

$git clone https://github.com/videolan/vlc.git

For some reason libvpadu1 depends on the latest systemd

$sudo apt-get upgrade -t jessie-backports systemd

$sudo apt-get build-dep -t jessie-backports vlc
@brianherman
brianherman / jessie-mssql.md
Last active June 15, 2018 19:00
Debian Jessie and mssql-server

Download mssql from the microsoft website.

wget https://packages.microsoft.com/ubuntu/16.04/mssql-server/pool/main/m/mssql-server/mssql-server_14.0.1.246-6_amd64.deb

dpkg -i mssql-server_14.0.1.246-6_amd64.deb 

The next command will install dependancies.

sudo apt-get -f install 
how to upgrade sentry
sudo docker rm -f my-sentry
sudo docker -i -t my-sentry /bin/bash(attach to sentry)
while attached run command:
sentry upgrade
re run sentry with secret key
@brianherman
brianherman / sawtooth.md
Created December 16, 2017 03:59
sawtooth notes

https://sawtooth.hyperledger.org/docs/core/releases/latest/_autogen/txn_submit_tutorial.html Generally, to compile Python Protobufs you would follow these instructions to install Google’s Protobuf compiler and manually compile Python classes however you like.

This example will use classes from the Sawtooth Python SDK, which can be compiled by running the executable script bin/protogen.

Sawtooth protocol buffers aren't in the pip package so you have to generate them.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.