We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
/*! | |
* \file pango_layout_word_wrap.c | |
* \brief pango layout word wrap | |
* | |
* \author Ben Pfaff http://benpfaff.org | |
* | |
* In working with Pango I found an oddity that I do not understand. | |
* It may be a bug, or it might just be my misunderstanding. | |
* | |
* As part of a table layout procedure for printing, my code wishes to find out |
/* | |
____ _____ | |
/\__ \ /\ ___\ | |
\/__/\ \ \ \ \__/_ | |
\ \ \ \ \____ \ | |
_\_\ \ \/__/_\ \ | |
/\ _____\ /\ _____\ | |
\/______/ \/______/ | |
Copyright (C) 2011 Joerg Seebohn |
try: | |
from gi.repository import Gtk | |
except ImportError: | |
import gtk as Gtk | |
def applet_factory(applet, iid, data = None): | |
button = Gtk.Button("It works!") | |
applet.add(button) | |
applet.show_all() | |
return True |
name of display: /tmp/launch-xggHqf/org.x:0 | |
version number: 11.0 | |
vendor string: The X.Org Foundation | |
vendor release number: 11003000 | |
X.Org version: 1.10.3 | |
maximum request size: 16777212 bytes | |
motion buffer size: 256 | |
bitmap unit, bit order, padding: 32, LSBFirst, 32 | |
image byte order: LSBFirst | |
number of supported pixmap formats: 7 |
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.
/* Example code of using harfbuzz together with Core Text APIs. */ | |
#include <hb-coretext.h> | |
int main(int argc, char* argv[]) { | |
if (argc != 3) { | |
fprintf(stderr, "usage: %s <PostScript-Name> <text>\n", argv[0]); | |
return 1; | |
} |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <assert.h> | |
#include <ft2build.h> | |
#include FT_FREETYPE_H | |
#include FT_GLYPH_H | |
#include FT_OUTLINE_H | |
#include <hb.h> |
#!/bin/bash | |
# A simple script to check if a process is running and if it is will | |
# kill and restart the process | |
# Modified from example provided at: | |
# https://www.m00nie.com/2011/12/script-to-check-if-a-process-is-running-and-if-not-start-it/ | |
################################################ | |
# The name of the program to check | |
PROGRAM=locate-pointer | |
################################################ |
function descriptor() | |
return { | |
title = "Radio recorder", | |
version = "0.1", | |
author = "Yoav", | |
url = "", | |
shortdesc = "Radio recorder", | |
description = "Helps record the radio", | |
capabilities = { "input-listener" } | |
} |