Skip to content

Instantly share code, notes, and snippets.

View roghnin's full-sized avatar
🎯
I may be slow to respond.

Haosen (Hensen) Wen roghnin

🎯
I may be slow to respond.
  • University of Rochester
  • Rochester, NY
View GitHub Profile
@roghnin
roghnin / gist:34766e3a8aeb3abb56198ef0dec56577
Created November 2, 2017 04:38 — forked from mwchambers/gist:1319382
Convert vhd disk to raw
qemu-img convert -O raw source.vhd output.raw
@roghnin
roghnin / 70-synaptics.conf
Last active January 7, 2023 16:48
/etc/X11/xorg.conf.d/70-synaptics.conf
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# Additional options may be added in the form of
# Option "OptionName" "value"
#
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
@roghnin
roghnin / gc_notes.txt
Last active April 7, 2017 06:31
gc_notes
-Background
-garbage collection = memory reclaiming = free(), making the memory able to be allocated again.
-Need a garbage collection algorithm for CONCURRENT, LOCK FREE data structures.
-concurrent data structures is harder since readers can still be in a retired node.
-For lock free scenarios, it's hard to decide when it's a good time to reclaim a node.
-NOT concurrent garbage collection. (Although it's another interesting topic)
-Automatic Technique: simply killing the pointers will trigger the garbage collection.
-Reference counts
#!/usr/bin/env python
from mininet.net import Mininet
from mininet.node import Controller, RemoteController
from mininet.cli import CLI
from mininet.log import setLogLevel, info
from mininet.link import Link, Intf, TCLink
from mininet.topo import Topo
from mininet.util import dumpNodeConnections
from mininet.node import Host
@roghnin
roghnin / upgrade_ovs_in_mininet.sh
Created March 29, 2016 06:03 — forked from pichuang/upgrade_ovs_in_mininet.sh
Installing new version of Open vSwitch 2.3.0 use Mininet
#!/bin/sh -ev
# Reference: https://github.com/mininet/mininet/wiki/Installing-new-version-of-Open-vSwitch
# How to test: ovs-vsctl -V
# Check permission
test $(id -u) -ne 0 && echo "This script must be run as root" && exit 0
#Remove old version ovs
aptitude remove openvswitch-common openvswitch-datapath-dkms openvswitch-controller openvswitch-pki openvswitch-switch -y