Skip to content

Instantly share code, notes, and snippets.

View willbprog127's full-sized avatar
💭
Brain damaged -- what else is new?

Will Brokenbourgh willbprog127

💭
Brain damaged -- what else is new?
View GitHub Profile
@willbprog127
willbprog127 / function-pointer-test.c
Last active March 21, 2018 22:08
Function pointers in C
/*
* this program demonstrates function pointers in C
*/
#include <stdlib.h>
#include <stdio.h>
/* define our 'object' struct */
typedef struct {
will@will-oi:~$ sudo truss -af /opt/VirtualBox/VirtualBox
2478: execve("/opt/VirtualBox/VirtualBox", 0xFFFFFD7FFFDFFCE8, 0xFFFFFD7FFFDFFCF8) argc = 1
2478: argv: /opt/VirtualBox/VirtualBox
2478: sysinfo(SI_MACHINE, "i86pc", 257) = 6
2478: mmap(0x00000000, 56, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, 4294967295, 0) = 0xFFFFFD7FFF380000
2478: mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, 4294967295, 0) = 0xFFFFFD7FFF370000
2478: mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, 4294967295, 0) = 0xFFFFFD7FFF360000
2478: mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, 4294967295, 0) = 0xFFFFFD7FFF350000
2478: memcntl(0xFFFFFD7FFF398000, 96376, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
2478: mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, 4294967295, 0) = 0xFFFFFD7FFF340000
@willbprog127
willbprog127 / cursor-change-snippet.cpp
Created August 19, 2016 03:24
Snippet to show usage of 'GotCursorShape' in libvncserver/libvncclient
/*
* This example was written using the Qt toolkit, but you should be
* able to get a general idea of what's going on
*/
/* ============================================================================== */
/*
* When you set up your libvncserver client, you need to set useRemoteCursor
* to true and be sure to set the callback for GotCursorShape
@willbprog127
willbprog127 / gist:05db7a43d889ca70da21
Last active November 4, 2015 07:24
FreeBSD 10.2 issues
* Base system is fine, and my change from AMD processor / ASUS motherboard to
Intel / Gigabyte seems to have made nice performance improvements
* Packages are where the problems lie...
- PCManFM: When doing certain file ops, the list of files does not update,
showing stale info. I think this is due to hacky workaround with glib and gtk2 affecting kqueue
- Eclipse: Crashing and reliability issues compared to Linux counterparts
- gtk-vnc: Package does not have python bindings and doesn't work properly with py27-gtk2
- VirtualBox: Package is pretty stale, still ver. 4.x.x while latest is 5.x.x
- Audacious: Audacious will start using 100 percent CPU after running for a while.
@willbprog127
willbprog127 / .startup
Created July 16, 2014 19:08
.fluxbox - startup
#!/bin/sh
#
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.
# Change your keymap:
# xmodmap "/home/will/.Xmodmap"
# load X resources from .Xresources file
@willbprog127
willbprog127 / .Xresources
Created July 16, 2014 19:05
.Xresources
! Xft -----------------------
Xft.antialias: true
Xft.hinting: true
Xft.rgba: none
Xft.autohint: false
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
! Xcursor -------------------
Xcursor.theme: Neutral
@willbprog127
willbprog127 / .gtkrc-2.0
Created July 16, 2014 19:02
.gtkrc-2.0
gtk-theme-name="Clearlooks5000Gina"
gtk-icon-theme-name="gnome-brave"
gtk-font-name="Luxi Sans 10"
gtk-cursor-theme-name="Neutral"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=0
@willbprog127
willbprog127 / Trolltech.conf
Created July 16, 2014 19:00
.config - Trolltech.conf
[Qt]
style=GTK+
export QT_STYLE_OVERRIDE=gtk
# these are only if you're using the latest Qt5 downloaded from qt-project
export QTDIR=/opt/Qt/5.3
export PATH=$PATH:/opt/Qt/5.3/bin