Skip to content

Instantly share code, notes, and snippets.

@AsherGlick
AsherGlick / Commands.md
Last active August 8, 2022 15:03
KVM and Virsh Tips And Tricks

Introduction

I have spent several months running and building a virtual machine. I will be using this gist to describe how to duplicate the results I get

After I figure out all the pieces of functionality I want I plan to create a better set of documentation for how to do all of this

Here is a list of things I want to accomplish

  • Install kvm and virsh on Linux
  • Create a new VM that an operating system can be installed on
  • Connect to the VM via VNC from a remote computer
@AsherGlick
AsherGlick / gist:6000238
Last active December 19, 2015 18:39
Python Tricks Cheatsheet Some uniqueness about python that may not be entirely obvious

These are some tricks and features that may not be the most obvious things coming from other languages but have been very helpful otherwise.
Not even close to everything is here, but as I stumble across things I will add them
Contributions are also welcome

Listing all the children of an object

parent_object = <object you care about>
[method for method in dir(parent_object)]
============================UNIVERSAL PIN MAPPING===============================
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1 | \ | | | | X | X | X | X | X | X | X | X | X | X | X | X |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
2 | | \ | | | X | X | X | X | X | X | X | X | X | X | X | X |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
3 | | | \ | | X | X | X | X | X | X | X | X | X | X | X | X |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
4 | | | | \ | X | X | X | X | X | X | X | X | X | X | X | X |
@AsherGlick
AsherGlick / gist:5144614
Created March 12, 2013 16:49
A short untested arduino script that illustrates how to manually config the charlie cube pin mappings
void setup() {
Serial.begin(9600);
// Define all the pins you will be using
int pins[] = {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
// Initialize the pins
for (int i = 0; i < 16; i ++) pinMode(pins[i],input);
//Cycle through all the pin combinations
@AsherGlick
AsherGlick / .bashrc
Created September 17, 2012 21:15
My General Bashrc
################################################################################
# MY CODE #
################################################################################
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\][\u@\h]\[\033[00m\]\[\033[01;34m\]\w\[\033[00m\]\$ '
################################################################################
################################ SIMPLE COMMANDS ###############################
################################################################################
alias ..="cd .."
alias bashrc="sublime ~/.bashrc"
@AsherGlick
AsherGlick / howto.md
Created September 17, 2012 20:47
Creating Ubuntu Launchers

Creating a new application for the application list

Put the .desktop file into the folder /usr/share/applications/

@AsherGlick
AsherGlick / practaces.md
Created June 7, 2012 19:48
Good Git Practaces

Adding Files to Git

  1. git status get the list of modifications since the last commit
  2. git add <filename> add a file to the git buffer
  3. git commit -m '<commit message>' commit the changes in the buffer to memory with a message about what changed

Good Practices

  • Only commit one change at a time (usually this is one file at a time, but not allways)
  • Use useful commit messages, messages like a;lsjdafawe or debugging. Use something like added buttons to the main screen or fixed Issue #13
#define red1pin 11
#define red2pin 3
#define green1pin 5
#define green2pin 2
#define col1pin 10
#define col2pin 4
#define resetpin 9
#define enablepin 6
#define register_clockpin 7
#define shift_clockpin 8