Skip to content

Instantly share code, notes, and snippets.

View senpl's full-sized avatar

Michał Urbanek senpl

View GitHub Profile
@gdesatrigraha
gdesatrigraha / linux-gpu-passthrough.md
Last active December 29, 2023 07:04
personal notes on trying gpu-passthrough with ubuntu 18.04

command: apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager ovmf qemu-utils hugepages

command: for iommu_group in $(find /sys/kernel/iommu_groups/ -maxdepth 1 -mindepth 1 -type d); do echo "IOMMU group $(basename "$iommu_group")"; for device in $(ls -1 "$iommu_group"/devices/); do echo -n $'\t'; lspci -nns "$device"; done; done outputs:

IOMMU group 17
	0a:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] [10de:1c03] (rev a1)
	0a:00.1 Audio device [0403]: NVIDIA Corporation GP106 High Definition Audio Controller [10de:10f1] (rev a1)
IOMMU group 16
	09:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK208 [GeForce GT 710B] [10de:128b] (rev a1)
@sdnts
sdnts / example.md
Last active January 10, 2023 20:50
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});
@Francesco149
Francesco149 / osu_on_linux_overhaul.md
Last active April 12, 2024 21:56
Ultimate guide to low-latency osu on linux
@hanneshapke
hanneshapke / Editable Fields with ReactJS and ES2015
Last active June 21, 2019 12:26
Simple editable field with ReactJS and ES2015
### Try it out with JSBin
(JSBin)[http://jsbin.com/dijefajalo/edit?html,js,console,output]
@yqritc
yqritc / TextThumbSeekBar.md
Last active April 17, 2024 08:26
SeekBar showing its progress as text on thumb

TextThumbSeekBar

Define a custom class extending SeekBar to show the progress text on thumb of SeekBar.

public class TextThumbSeekBar extends SeekBar {

    private int mThumbSize;
    private TextPaint mTextPaint;

    public TextThumbSeekBar(Context context) {
@ihoegen
ihoegen / rss43
Last active July 8, 2017 09:25
List of RSS feed43 parameters
<!--Search Parameters-->
<a class="imgtooverlay" href="{%}"{*}<img src="{%}"
{*}
<h3>{%}</h3>{*}
<div class="address"> {%}</div>
{*}<td class="divider">{*}</td>{*}
<strong>Bedrooms:</strong>{*}
<td>{%}</td>{*}
<td class="divider">{%}</td>{*}
<strong>Square Feet:</strong>{*}
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active May 2, 2024 14:54
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@kazufusa
kazufusa / install_PyQt5.md
Last active December 11, 2018 12:01
PyQt5 install @ Ubuntu

Preliminary

You need python3 and python3-dev.

sudo apt-get install python3 python3-dev

Installing Qt5 SDK