Skip to content

Instantly share code, notes, and snippets.

@fmpwizard
fmpwizard / light-node.ino
Last active February 23, 2016 00:19
LED Strip lights for the garage door
// Sample RFM69 receiver/gateway sketch, with ACK and optional encryption, and Automatic Transmission Control
// Passes through any wireless received messages to the serial port & responds to ACKs
// It also looks for an onboard FLASH chip, if present
// RFM69 library and sample code by Felix Rusu - http://LowPowerLab.com/contact
// Copyright Felix Rusu (2015)
#include <RFM69.h> //get it here: https://www.github.com/lowpowerlab/rfm69
#include <RFM69_ATC.h>//get it here: https://www.github.com/lowpowerlab/rfm69
#include <SPI.h> //comes with Arduino IDE (www.arduino.cc)
@fmpwizard
fmpwizard / house-led-strip.ino
Last active January 27, 2016 07:20
Control 150 LED lights, listen for code to go to next pattern
#include <Adafruit_NeoPixel.h>
#include "Arduino.h"
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 6
//On off with ultrasonic distance sensor
@fmpwizard
fmpwizard / moteino-gateway.ino
Created January 10, 2016 19:55
Moteino gateway and one node, the gateway turns one LED on when it gets the letter 'Z'
// Sample RFM69 receiver/gateway sketch, with ACK and optional encryption, and Automatic Transmission Control
// Passes through any wireless received messages to the serial port & responds to ACKs
// It also looks for an onboard FLASH chip, if present
// RFM69 library and sample code by Felix Rusu - http://LowPowerLab.com/contact
// Copyright Felix Rusu (2015)
#include <RFM69.h> //get it here: https://www.github.com/lowpowerlab/rfm69
#include <RFM69_ATC.h>//get it here: https://www.github.com/lowpowerlab/rfm69
#include <SPI.h> //comes with Arduino IDE (www.arduino.cc)
@fmpwizard
fmpwizard / time-lapse.sh
Created November 12, 2013 01:30
Take pictures on the Raspberry Pi once a second and store them on a uuid named folder This runs at boot time using @reboot on cron
#!/bin/bash
let X=1;
folder=`/usr/bin/dbus-uuidgen`
cd /home/pi/camera/trip
mkdir $folder
cd $folder
while true; do
raspistill -rot 90 -w 1024 -h 768 -o $X.jpg
sync
echo "Image: $X.jpg";
import sbt._
import sbt.Keys._
object MyBuild extends Build {
import Dependencies._
import BuildSettings._
lazy val main = Project("root", file("."))
.settings(mainWebSettings: _*)
.settings(
sysadmins-MacBook-Pro-8:Desktop diego.medina$ wget http://repo.cloudbees.com/content/groups/public/net/liftweb/lift-webkit_2.9.1/2.5/lift-webkit_2.9.1-2.5.jar
--2013-08-07 22:26:43-- http://repo.cloudbees.com/content/groups/public/net/liftweb/lift-webkit_2.9.1/2.5/lift-webkit_2.9.1-2.5.jar
Resolving repo.cloudbees.com... 184.73.168.54
Connecting to repo.cloudbees.com|184.73.168.54|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5883511 (5.6M) [application/java-archive]
Saving to: ‘lift-webkit_2.9.1-2.5.jar’
100%[==================================================================================================================================================================================================>] 5,883,511 1.10MB/s in 5.0s
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
<head>
<title>Administration</title>
<base href="https://furniturefitter.com/admin/" />
<link rel="stylesheet" type="text/css" href="view/stylesheet/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="view/javascript/jquery/ui/themes/ui-lightness/ui.all.css" />
<script type="text/javascript" src="view/javascript/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="view/javascript/jquery/ui/ui.core.js"></script>
23:54:37,836 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
23:54:37,837 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
23:54:37,837 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.x.incremental.667 "Steropes" started in 1580ms - Started 124 of 178 services (53 services are passive or on-demand)
00:08:08,084 INFO [org.jboss.as.server.deployment] (MSC service thread 1-14) JBAS015876: Starting deployment of "ROOT.war" (runtime-name: "ROOT.war")
00:08:11,272 INFO [io.escalante.artifact.maven] (pool-5-thread-1) Downloading: http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.2/scala-library-2.10.2.pom
00:08:11,525 INFO [io.escalante.artifact.maven] (pool-6-thread-1) Downloading: http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.2/scala-library-2.10.2.jar
00:08:21,679 INFO [io.escalante.artifact.maven] (pool-7-thread-1) Dow
@fmpwizard
fmpwizard / gist:5316092
Created April 5, 2013 02:16
escalante error
> last *:escalante-run
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:99)
at io.escalante.sbt.EscalantePlugin$.unzip(EscalantePlugin.scala:283)
at io.escalante.sbt.EscalantePlugin$.runEscalante(EscalantePlugin.scala:231)
at io.escalante.sbt.EscalantePlugin$$anonfun$baseEscalanteSettings$8.apply(EscalantePlugin.scala:91)
at io.escalante.sbt.EscalantePlugin$$anonfun$baseEscalanteSettings$8.apply(EscalantePlugin.scala:91)
@fmpwizard
fmpwizard / angular.js
Created March 25, 2013 13:56
Angular JS called form Lift's comet actors
(function(){
$(document).ready(function() {
//Just like Lift removes elements with this class name
$('.clearable').remove();
$(document)
.on('new-ng-chat', function(event, data) {
addNGMessages( data )
})
.on('initial-chat-messages', function(event, data){
//We do this to get the array as one var.