Skip to content

Instantly share code, notes, and snippets.

applet_files: $(TARGET).ino
test -d applet || mkdir applet
echo '#include "Arduino.h"' > applet/$(TARGET).cpp
cat $(TARGET).ino >> applet/$(TARGET).cpp
cat $(ARDUINO)/cores/arduino/main.cpp >> applet/$(TARGET).cpp
diff --git a/src/clj/clojure/java/browse.clj b/src/clj/clojure/java/browse.clj
index d6f710b..3924245 100644
--- a/src/clj/clojure/java/browse.clj
+++ b/src/clj/clojure/java/browse.clj
@@ -10,14 +10,29 @@
^{:author "Christophe Grand",
:doc "Start a web browser from Clojure"}
clojure.java.browse
+ (:use [clojure.string :only (split)])
(:require [clojure.java.shell :as sh])
/*
delay_ms() test, compile with:
avr-gcc -mmcu=atmega328p -Wall -DF_CPU=1000000UL -Os -o main.out main.c
*/
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
#include <avr/interrupt.h>
(*
Module: BootConf
Parses (Open)BSD-stype /etc/boot.conf
Author: Jasper Lievisse Adriaanse <jasper@jasper.la>
About: Reference
This lens is used to parse the second-stage bootstrap configuration
file, /etc/boot.conf as found on OpenBSD. The format is largely MI,
with MD parts included:
@jasperla
jasperla / gist:4706054
Created February 4, 2013 10:30
cppcheck -f output for wpa_supplicant 2.0
[src/crypto/tls_schannel.c:419]: (error) Array 'outbufs[1]' accessed at index 1, which is out of bounds.
[src/crypto/tls_schannel.c:420]: (error) Array 'outbufs[1]' accessed at index 1, which is out of bounds.
[src/l2_packet/l2_packet_ndis.c:205] -> [src/l2_packet/l2_packet_ndis.c:224]: (error) Possible null pointer dereference: l2_ndisuio_global - otherwise it is redundant to check it against null.
[src/utils/pcsc_funcs.c:1133]: (error) syntax error
[src/utils/radiotap.c:95]: (error) Uninitialized variable: __ptr
[src/utils/radiotap.c:98]: (error) Uninitialized variable: __ptr
[src/utils/radiotap.c:272]: (error) Uninitialized variable: __ptr
[wpa_supplicant/config.c:2666] -> [wpa_supplicant/config.c:2667]: (error) Possible null pointer dereference: ssid - otherwise it is redundant to check it against null.
[wpa_supplicant/dbus/dbus_new_handlers_p2p.c:1061] -> [wpa_supplicant/dbus/dbus_new_handlers_p2p.c:1069]: (error) Possible null pointer dereference: peer_obj_paths - otherwise it is redundant to check it a
@jasperla
jasperla / BSD.rb
Last active December 20, 2015 04:49
# Calls like this:
# Facter::Util::Resolution.exec("sysctl hw.physmem | cut -d'=' -f2")
# can now be made with:
# Facter::Util::BSD.sysctl("hw.physmem")
module Facter
module Util
module BSD
# Provides a consistent way of invoking sysctl(8) across various BSD platforms
#
--- README_PORTING.orig 2013-10-20 11:52:04.000000000 -0200
+++ README_PORTING 2013-10-20 11:52:34.000000000 -0200
@@ -26,7 +26,7 @@ BUILDING MG
So, basic instructions for building mg:
- Get clens installed. I hope someone will build packages for it.
- - Install pmake, the bsd version of make.
+ - Install BSD make (pmake on Linux or bsd_make for Mac OS X brew)
- run the following commands:
require 'puppet/provider/package'
# Packaging on OpenBSD. Doesn't work anywhere else that I know of.
Puppet::Type.type(:package).provide :openbsd, :parent => Puppet::Provider::Package do
desc "OpenBSD's form of `pkg_add` support."
commands :pkginfo => "pkg_info", :pkgadd => "pkg_add", :pkgdelete => "pkg_delete"
defaultfor :operatingsystem => :openbsd
confine :operatingsystem => :openbsd
@jasperla
jasperla / test_sshd.aug
Created January 22, 2014 11:14
Updated test Augeas sshd test
module Test_sshd =
let accept_env = "Protocol 2
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL\n"
test Sshd.lns get accept_env =
{ "Protocol" = "2" }
{ "AcceptEnv"
{ "1" = "LC_PAPER" }
Index: _arch-n-opsys
===================================================================
--- _arch-n-opsys (revision 3868)
+++ _arch-n-opsys (working copy)
@@ -104,8 +104,9 @@
OpenBSD)
OPSYS=openbsd
HEAP_OPSYS=bsd
- case `uname -m` in
+ case `uname -p` in