Skip to content

Instantly share code, notes, and snippets.

View 128keaton's full-sized avatar

Keaton Burleson 128keaton

View GitHub Profile
#!/bin/sh
POPUP=`dirname "$0"`/cocoaDialog.app/Contents/MacOS/cocoaDialog
# create a named pipe
rm -f /tmp/hpipe
mkfifo /tmp/hpipe
# create a background job which takes its input from the named pipe
$POPUP progressbar \
/* gcc -std=c99 -o brightness brightness.c -framework IOKit -framework ApplicationServices */
#include <stdio.h>
#include <unistd.h>
#include <IOKit/graphics/IOGraphicsLib.h>
#include <ApplicationServices/ApplicationServices.h>
const int kMaxDisplays = 16;
const CFStringRef kDisplayBrightness = CFSTR(kIODisplayBrightnessKey);
const char *APP_NAME;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>download</key>
<string>http://apple.com</string>
<key>version</key>
<string>4.03</string>
<key>categories</key>
<dict>
//
// ProfileManager.swift
// Logglu
//
// Created by Keaton Burleson on 11/11/16.
// Copyright © 2016 Keaton Burleson. All rights reserved.
//
import Foundation
//
// ProfileViewController.swift
// Bg-Mon
//
// Created by Keaton Burleson on 4/4/16.
// Copyright © 2016 Keaton Burleson. All rights reserved.
//
import Foundation
import UIKit
//
// ProfileViewController.swift
// Bg-Mon
//
// Created by Keaton Burleson on 4/4/16.
// Copyright © 2016 Keaton Burleson. All rights reserved.
//
import Foundation
import UIKit
@128keaton
128keaton / dash-listen-3.py
Last active July 9, 2016 06:14 — forked from ibrahima/dash-listen-3.py
Amazon Dash Button ARP listener script (not written by me)
import socket
import struct
import binascii
# Written by Bob Steinbeiser (https://medium.com/@xtalker)
rawSocket = socket.socket(socket.AF_PACKET, socket.SOCK_RAW,
socket.htons(0x0003))
MAC = '74c24671971c'
@128keaton
128keaton / SortedTableView.swift
Created July 7, 2016 06:42
Sorting a UITableView by a NSDate object with headers in Swift
extension NSDate{
convenience
init(inputDate: NSDate){
let calendar = NSCalendar.currentCalendar()
let timeZone = NSTimeZone.systemTimeZone()
calendar.timeZone = timeZone
let comps = calendar.components([NSCalendarUnit.Year, NSCalendarUnit.Month, NSCalendarUnit.Day ], fromDate: inputDate)
comps.hour = 0
comps.minute = 0
comps.second = 0
#!/bin/bash
FILES=./*
for f in $FILES
do
echo "#import \"${f//.\/}\""
done
# place in the framework directory, e.g. preferences, and chmod a+x umbrella.sh && ./umbrella.sh
Hello Polly,
Let me explain the issues ive been having with the API.
Here is my HTML code for fetching the list id for the name 'Today':
$tomorrow_id;
$today_id;
$ch2 = curl_init();