custom
View Hario V60.txt
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
View DispatchTimer.swift
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
let source = DispatchSource.makeTimerSource() | |
source.setEventHandler { | |
NSLog("hello world") | |
} | |
source.schedule(deadline: .now(), repeating: .seconds(2)) | |
source.resume() |
View bluetooth-agent.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
### BEGIN INIT INFO | |
# Provides: bluetooth-agent | |
# Required-Start: $remote_fs $syslog bluetooth pulseaudio | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Makes Bluetooth discoverable and connectable to 0000 | |
# Description: Start Bluetooth-Agent at boot time. | |
### END INIT INFO | |
#! /bin/sh |
View udev-bluetooth.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 | |
#change if you don't use default analog audio out. | |
#THIS DIDN'T WORK FOR MY PI SO I ADDED A amixer COMMAND BELOW | |
AUDIOSINK="alsa_output.platform-bcm2835_AUD0.0.analog-stereo" | |
echo "Executing bluetooth script...|$ACTION|" >> /var/log/bluetooth_dev | |
ACTION=$(expr "$ACTION" : "\([a-zA-Z]\+\).*") | |
if [ "$ACTION" = "add" ] | |
then |
View SwiftTour.swift
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
// Basic swift stuff | |
// constant | |
let x = 1 | |
//x = 2 // error | |
// variable | |
var y: Int = 2 | |
y = 3 |
View gist:21f8dee29b4b38c17249
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
var plotSpace = graph.defaultPlotSpace as CPTXYPlotSpace | |
var xRange = plotSpace.xRange.mutableCopy() as CPTMutablePlotRange | |
var yRange = plotSpace.yRange.mutableCopy() as CPTMutablePlotRange | |
xRange.setLengthFloat(10) | |
yRange.setLengthFloat(10) | |
plotSpace.xRange = xRange | |
plotSpace.yRange = yRange |
View CPTMutablePlotRange+SwiftCompat.m
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
// | |
// CPTMutablePlotRange+SwiftCompat.m | |
// CorePlotTest | |
// | |
// Created by Al Wold on 8/29/14. | |
// Copyright (c) 2014 Al Wold. All rights reserved. | |
// | |
#import "CPTMutablePlotRange+SwiftCompat.h" |
View CPTMutablePlotRange+SwiftCompat.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
// | |
// CPTMutablePlotRange+SwiftCompat.h | |
// CorePlotTest | |
// | |
// Created by Al Wold on 8/29/14. | |
// Copyright (c) 2014 Al Wold. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
#import "CPTMutablePlotRange.h" |
View ViewController.swift
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
// | |
// ViewController.swift | |
// CorePlotTest | |
// | |
// Created by Al Wold on 8/6/14. | |
// Copyright (c) 2014 Al Wold. All rights reserved. | |
// | |
import UIKit |
NewerOlder