Skip to content

Instantly share code, notes, and snippets.

View woodruffw's full-sized avatar
💭
tabula sacer votiva paries indicat uvida suspendisse potenti vestimenta ad mare

William Woodruff woodruffw

💭
tabula sacer votiva paries indicat uvida suspendisse potenti vestimenta ad mare
View GitHub Profile
#include <X11/Xlib.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int x, y, width, height, border;
Display *disp;
int screen;
Window wind;
#include <X11/Xlib.h>
#include <X11/Xutil.h> /* for XSizeHints */
#include <stdio.h>
#include <stdlib.h>
#define MIN 200
#define MAX 800
int main(void)
{
/* create_window
Create a new X window on the specified display (must be opened) at the given
coordinates with the given constraints.
NO ERROR CHECKING IS DONE.
Arguments:
Display *disp - a pointer to the X display
int max_width, max_height - the maximum pixel width and height of the window
int width, height - the starting pixel width and height of the window
/* name_window
Name the given window "name" on the given display.
Arguments:
Display *disp - a pointer to the X display
Window wind - the window being named
const char *name - the name being given to the window
*/
void name_window(Display *disp, Window wind, const char *name)
{
/* set_window_front
On EWMH-compliant window managers, sets the _NET_WM_STATE of the given
window to _NET_WM_STATE_ABOVE to make it stay on top of all others besides
_NET_WM_STATE_FULLSCREEN. If the window manager is not EWMH-compliant,
nothing is done.
Arguments:
Display *disp - a pointer to the X display
Window wind - the window being moved to the front
*/
@woodruffw
woodruffw / screenfetch-c.html
Created March 31, 2015 21:25
screenfetch-c.html
<!-- Creator : groff version 1.22.2 -->
<!-- CreationDate: Tue Mar 31 17:15:32 2015 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
@woodruffw
woodruffw / keybase.md
Created May 26, 2015 17:05
keybase.md

Keybase proof

I hereby claim:

  • I am woodruffw on github.
  • I am yossarian (https://keybase.io/yossarian) on keybase.
  • I have a public key whose fingerprint is 46C3 9716 A8F0 7E98 384E 28F7 85AE 00C5 0483 3B3C

To claim this, I am signing this object:

require 'cinch'
$COUNT = 1
module Cinch
module Plugin
module ClassMethods
def test_hook
puts self
hook :pre, :for => [:match], :method => :test_hook
@woodruffw
woodruffw / test
Created December 1, 2015 22:37
test
test
#!/usr/bin/env bash
# wwwbackup: back woodruffw.us files up to tarball, rotate weekly
if [[ "$(hostname)" != "athena" ]] ; then
echo "Wrong host, dummy."
exit 1
fi
shopt -s nullglob