Skip to content

Instantly share code, notes, and snippets.

View sneetsher's full-sized avatar
🙂
I may be slow to respond.

Abdellah C. sneetsher

🙂
I may be slow to respond.
  • Jijel, Algeria
View GitHub Profile
@yoavst
yoavst / radio.lua
Created June 6, 2020 15:07
Radio recorder
function descriptor()
return {
title = "Radio recorder",
version = "0.1",
author = "Yoav",
url = "",
shortdesc = "Radio recorder",
description = "Helps record the radio",
capabilities = { "input-listener" }
}
@hjhsalo
hjhsalo / locate-pointer-starter.sh
Last active October 13, 2019 09:46 — forked from sneetsher/locate-pointer.c
Locate mouse pointer (Highlight is removed after a certain amount of loop cycles. Optional bash startup script to prevent duplicate instances.)
#!/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
################################################
#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>
/* 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;
}
@Nagyman
Nagyman / workflows-in-django.md
Last active June 9, 2024 05:44
Workflows in Django

Workflows (States) in Django

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.

Common Software Uses

  • Publishing (Draft->Approved->Published->Expired->Deleted)
@magnetikonline
magnetikonline / README.md
Last active March 14, 2024 22:48
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@sidorares
sidorares / gist:2582961
Created May 3, 2012 03:43
xdpy output
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
@palfrey
palfrey / HelloWorldApplet.py
Created February 28, 2012 23:06
Example applet stub
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
@je-so
je-so / testprogram.c
Last active May 5, 2024 20:38
Xlib transparent window with OpenGL support
/*
____ _____
/\__ \ /\ ___\
\/__/\ \ \ \ \__/_
\ \ \ \ \____ \
_\_\ \ \/__/_\ \
/\ _____\ /\ _____\
\/______/ \/______/
Copyright (C) 2011 Joerg Seebohn
@bert
bert / pango_layout_word_wrap.c
Created December 23, 2009 05:28
Pango layout word wrap example
/*!
* \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