Skip to content

Instantly share code, notes, and snippets.

View miho's full-sized avatar

Michael Hoffer miho

View GitHub Profile
@mschmitt
mschmitt / virtualwall_irremote.pde
Created May 24, 2010 08:56
A trivial Arduino sketch to mimic iRobot Virtual Wall for Roomba
/*
A trivial Arduino sketch to mimic iRobot Virtual Wall for Roomba
----------------------------------------------------------------
Based on information found at:
http://sites.google.com/site/irobotcreate2/createanirbeacon
Uses "A Multi-Protocol Infrared Remote Library for the Arduino":
http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@andytill
andytill / FXUtils.java
Last active May 7, 2021 06:59
Utility for for finding a JavaFX node by it's ID
package test;
import javafx.scene.*;
import javafx.scene.control.*;
public class FXUtils {
/**
* Find a {@link Node} within a {@link Parent} by it's ID.
* <p>
@lukewpatterson
lukewpatterson / gist:4242707
Created December 9, 2012 00:24
squeezing private SSH key into .travis.yml file
Tricks to add encrypted private SSH key to .travis.yml file
To encrypt the private SSH key into the "-secure: xxxxx....." lines to place in the .travis.yml file, generate a deploy key then run: (to see what the encrypted data looks like, see an example here: https://github.com/veewee-community/veewee-push/blob/486102e6f508214b04414074c921475e5943f682/.travis.yml#L21
base64 --wrap=0 ~/.ssh/id_rsa > ~/.ssh/id_rsa_base64
ENCRYPTION_FILTER="echo \$(echo \"-\")\$(travis encrypt veewee-community/veewee-push \"\$FILE='\`cat $FILE\`'\" | grep secure:)"
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_
@probonopd
probonopd / Send infrared commands from the Arduino to the iRobot Roomba
Created March 17, 2013 10:42
Send infrared commands from the Arduino to the iRobot Roomba. Use a transistor to drive the IR LED from pin D3 for maximal range.
#include <IRremote.h>
/*
Send infrared commands from the Arduino to the iRobot Roomba
by probono
2013-03-17 Initial release
@Marlunes
Marlunes / hide_status_bar
Created July 16, 2013 07:54
FORCE HIDE STATUS BAR FOR IOS 7 AND 6
//viewDidload
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
// iOS 7
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
} else {
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}
@tomoTaka01
tomoTaka01 / gist:6700138
Created September 25, 2013 14:05
The temperature application using JavaFX and RaspberryPi.
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.text.Text;
import javafx.stage.Stage;
@tomdcc
tomdcc / build.gradle
Created September 22, 2015 07:43
Example for publishing a Gradle plugin to the plugin portal while downloading it from somewhere else
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.1"
}
}
@hendrikebbers
hendrikebbers / JavaFXNodeCreationBenchmark.java
Last active December 22, 2015 14:28
JavaFX Performance
import com.sun.javafx.scene.control.skin.ButtonSkin;
import com.sun.javafx.scene.control.skin.TextFieldSkin;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.beans.property.*;
import javafx.embed.swing.SwingNode;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.*;
@kinverarity1
kinverarity1 / rotary_encoder.ino
Last active March 30, 2021 16:08
Read incremental rotary encoder (optical) using Arduino Uno
/*
Read optical incremental rotary encoder output.
Serial output columns:
1. Absolute encoder position (pulses, integer)
2. Change in encoder position (pulses, integer)
3. Time since Arduino start in (microseconds, integer)
4. Change in time (microseconds, integer)
5. Speed (pulses per second, float)