View HelloLibrary.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Runtime.InteropServices; | |
namespace HelloApp | |
{ | |
class HelloLibrary | |
{ |
View Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: clean uninstall | |
prefix ?= /usr | |
exec_prefix ?= $(prefix) | |
bindir ?= $(exec_prefix)/bin | |
ETHERWAKE_src = ether-wake.c | |
ETHERWAKE_bin = ether-wake | |
ETHERWAKE_tgt = $(DESTDIR)$(bindir)/etherwake |
View queue.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script encapsulates the functionality of a queue. It requires there to be | |
# an input file with the data in the queue being separated on different lines. | |
# | |
INPUT=queue.txt | |
OUTPUT=trash.txt | |
CMD=/usr/bin/vlc |
View timer_unix.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <time.h> | |
#define PRINT_INTERVAL 1000 /* in milliseconds */ | |
#define MILLI 0 | |
#define MICRO 1 | |
#define NANO 2 | |
#define RESOLUTION MILLI | |
long diff_nano(struct timespec *start, struct timespec *end) |
View termios_dbg.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <sys/ioctl.h> | |
#include "termios_dbg.h" | |
#define CHECK_BIT(var, pos) ((var) & (1<<(pos))) | |
void ptermios_iflag(struct termios *tty) | |
{ | |
printf("c_iflag=0x%x\n", tty->c_iflag); |
View file_completion.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- dmenu.c 2012-10-09 15:30:08.605004976 -0500 | |
+++ dmenu.c 2012-10-09 15:46:59.318016781 -0500 | |
@@ -5,6 +5,7 @@ | |
#include <string.h> | |
#include <strings.h> | |
#include <unistd.h> | |
+#include <wordexp.h> | |
#include <X11/Xlib.h> | |
#include <X11/Xatom.h> | |
#include <X11/Xutil.h> |
View batt.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=UTF-8 | |
import sys, subprocess | |
p = subprocess.Popen(["acpitool", "-ab"], stdout=subprocess.PIPE) | |
output = p.communicate()[0] | |
# find the line with the battery percentage | |
o_cur = [l for l in output.splitlines() if '%' in l][0] |
View 74x165.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef LINUX_SPI_74X165_H | |
#define LINUX_SPI_74X165_H | |
struct nxp_74x165_chip_platform_data { | |
/* number assigned to the first GPIO */ | |
unsigned base; | |
/* GPIO used for latching chip(s) */ | |
unsigned latch; | |
/* number of chips daisy chained */ | |
unsigned daisy_chained; |
View timestamp.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <time.h> | |
void ptimestamp_micro(struct timespec *now, char *text) | |
{ | |
long us = (now->tv_sec * 1000000) + (now->tv_nsec / 1000); | |
printf("%ld%s", us, text); | |
} |
View generate.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <getopt.h> | |
#include <time.h> | |
#define VERSION_H \ | |
"#ifndef %s_VERSION_H\n" \ | |
"#define %s_VERSION_H\n" \ |
NewerOlder