Skip to content

Instantly share code, notes, and snippets.

View 0xFelix's full-sized avatar

Felix Matouschek 0xFelix

View GitHub Profile
@acardace
acardace / debug-KV.md
Last active March 21, 2022 07:45
Debug KubeVirt controllers

TL;DR

Apply this patch, run make && make cluster-up && make cluster-sync, do a port-forward of the virt-controller 40000 port and connect to the remote dlv dlv connect :40000.

Compile in debug mode

This example shows the steps for the virt-controller but they apply to any binary in KubeVirt.

Let's start by adding the debug compilation options to not optimize the binary. Edit cmd/virt-controller/BUILD.bazel as follows.

@steveh
steveh / etc-samba-smb.conf
Created May 12, 2014 07:30
Samba dfree and zfs on Ubuntu 14.04
# File: /etc/samba/smb.conf
dfree command = /usr/local/bin/dfree
#!/bin/bash
CUR_PATH=`pwd`
ZFS_CHECK_OUTPUT=$(zfs get type $CUR_PATH 2>&1 > /dev/null) > /dev/null
if [[ $ZFS_CHECK_OUTPUT == *not\ a\ ZFS* ]]
then
IS_ZFS=false
else
IS_ZFS=true
fi
@burin
burin / gist:3840737
Created October 5, 2012 16:06
Full screen web app in iPhone 5 (save to home screen)
<!-- standard viewport tag to set the viewport to the device's width
, Android 2.3 devices need this so 100% width works properly and
doesn't allow children to blow up the viewport width-->
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" />
<!-- width=device-width causes the iPhone 5 to letterbox the app, so
we want to exclude it for iPhone 5 to allow full screen apps -->
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" />
<!-- provide the splash screens for iPhone 5 and previous -->
<link href="assets/splashs/splash_1096.png" rel="apple-touch-startup-image" media="(device-height: 568px)">
<link href="assets/splashs/splash_iphone_2x.png" rel="apple-touch-startup-image" sizes="640x960" media="(device-height: 480px)">