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
## | |
# Add uninstall target | |
# Requirements: Copy the uninstall.cmake file to the appropriate CMAKE_MODULE_PATH. | |
# | |
add_custom_target(uninstall | |
"${CMAKE_COMMAND}" -P "${CMAKE_MODULE_PATH}/uninstall.cmake" | |
) |
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
/** | |
* Easy to use, email protection using jQuery. | |
* Just the following to your HTML: | |
* <a href="#"><span class="email" user="me" domain="example" tld=".com"></span></a> | |
*/ | |
$(document).ready(function() { | |
$('.email').html(function() { | |
var address = $(this).attr('user') + '@' + $(this).attr('domain') + $(this).attr('tld'); | |
$(this).parent('a').attr('href', 'mailto:' + address); |
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
#define _GNU_SOURCE | |
#include <string.h> | |
#include <fcntl.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/mman.h> | |
#include <sys/stat.h> | |
#include <sys/types.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
#!/usr/bin/python | |
import sys | |
import re | |
import calendar | |
from datetime import date | |
from dateutil.relativedelta import relativedelta | |
date_format = '%Y/%m/%d' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>skew menu</title> | |
</head> | |
<body> | |
<nav> | |
<ul> |
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 | |
# Default settings | |
hostname=server.example.com | |
port=22 | |
keep_alive_interval=300 | |
keep_alive_count_max=2 | |
backoff=30 | |
user=user |
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 | |
if=${1-en1} | |
function get_if_mac() { | |
local if=$1 | |
ifconfig en1 | grep ether | sed -e 's/^[[:space:]]ether //' | |
} | |
mac=$(get_if_mac $if) |
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 | |
import sys | |
import socket | |
import select | |
def usage(name): | |
print('Usage {} [hostname:port](2..n)'.format(name)) | |
if (len(sys.argv) < 3): |
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 python2 | |
import signal, time, threading, socket, sys | |
import Adafruit_BBIO.GPIO as GPIO | |
class Pir: | |
def __init__(self, pin, pud=GPIO.PUD_UP): | |
self.pin = pin | |
self.pud = pud | |
GPIO.setup(self.pin, GPIO.IN, pull_up_down=pud) |
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
svn() { | |
local svn_cmd='/usr/bin/env svn' | |
case $1 in | |
stash) | |
case $2 in | |
"") | |
if ! $svn_cmd status | grep -q '^M'; then | |
echo "No outstanding changes" | |
return | |
fi |
OlderNewer