Skip to content

Instantly share code, notes, and snippets.

@TrilbyWhite
TrilbyWhite / mail_check.c
Created August 28, 2013 16:58
Example of parsing a local maildir.
#include <stdio.h>
#include <sys/stat.h>
#include <dirent.h>
int main(int argc, const char **argv) {
if (argc < 2) return 1;
DIR *dir;
struct dirent *de;
struct stat info;
time_t cur = 0,new = 0;
// build: gcc -o iwtest iwtest.c -liw
#include <stdio.h>
#include <iwlib.h>
int main(int argc, const char **argv) {
/* Check uid */
if (getuid() != 0) {
fprintf(stderr,"must be run as root.\n");
return 1;
// compile: gcc -o /somewhere/in/your/path/myprompt thisfile.c
// usage: PS1='$(myprompt $? \h \w)'
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
void cprint(int col, const char *str) { printf("\001\033[%dm\002%s", col, str); }
int main(int argc, const char **argv) {
# Maintainer: Jesse McClure aka "Trilby" <jesse dot mcclure at umassmed dot edu>
# Contributor: Doug Newgard <scimmia at archlinux dot info>
pkgname=qt5-webengine-widevine
pkgdesc='A browser plugin designed for the viewing of premium video content'
pkgver=1.4.8.903
pkgrel=1
epoch=1
arch=('i686' 'x86_64')
url='http://www.google.com/chrome'
general:
backend: webengine
completion.show: never
content:
javascript.modal_dialog: True
user_stylesheets: [ 'style.css' ]
downloads:
location.directory: /tmp/
location.prompt: False