Skip to content

Instantly share code, notes, and snippets.

@sh0ked
sh0ked / gist:b407972c648ef7644166a062feac888d
Created February 19, 2018 07:31
Record screencast and screenshots
{
"takeScreencast": true,
"takeScreenshot": true
}
@sh0ked
sh0ked / zshgit.md
Last active November 10, 2021 10:22 — forked from AdamMarsden/zshgit.md
Oh My Zsh - Git Cheat Sheet

#Oh My Zsh - Git Cheat Sheet

ggit

gstgit status

glgit pull

gupgit pull --rebase

from concurrent.futures import ProcessPoolExecutor
import time
import muffin
app = muffin.Application('hello_world')
def get_msg():
@sh0ked
sh0ked / System Design.md
Created June 2, 2016 06:43 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
For Trusty, you must compile usbip from sources yourself. I did it a couple of times in Linux Mint 17 (based on Trusty) and Debian 7. Here is what I ended up with:
On the Linux server that will share the USB devices or on any Linux client that will need to access shared devices on other servers:
- download the kernel source: apt-get install linux-source-3.13.0 (replace with your desired kernel version)
- extract the usbip sources from the kernel source tarball (e.g.: /usr/src/linux-source-3.13.0.tar.bz2): they should be under drivers/staging/usbip (or something like that); for instance, extract them to /root/usbip
- find where the file usb.ids from usbutils package is located in your system: apt-file search usb.ids (in my case it's at /usr/share/misc/usb.ids)
- enter /root/usbip/userspace to build the userspace tools:
./autogen.sh
./configure --with-usbids-dir=/usr/share/misc
make install
@sh0ked
sh0ked / version.py
Last active August 29, 2015 14:19 — forked from mina86/version.py
# -*- coding: utf-8 -*-
"""Calculates the current version number.
If possible, uses output of “git describe” modified to conform to the
visioning scheme that setuptools uses (see PEP 386). Releases must be
labelled with annotated tags (signed tags are annotated) of the following
format:
v<num>(.<num>)+ [ {a|b|c|rc} <num> (.<num>)* ]