Skip to content

Instantly share code, notes, and snippets.

Stian Eikeland stianeikeland

Block or report user

Report or block stianeikeland

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@stianeikeland
stianeikeland / log.json
Created Dec 3, 2019
Neato Botvac Charge Data logger
View log.json
{
"timestamp": "2019-12-03T00:01:01.274Z",
"Label": "Value",
"FuelPercent": "21",
"BatteryOverTemp": "0",
"ChargingActive": "0",
"ChargingEnabled": "1",
"ConfidentOnFuel": "0",
"OnReservedFuel": "0",
"EmptyFuel": "0",
View oloid.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View oloid.clj
(ns openscad-experiments.helpers
(:require [scad-clj.model :as m]
[scad-clj.scad :refer [write-scad]]))
(defn render [object]
(spit "render.scad" (write-scad object)))
(defn y-split [obj]
(let [box (m/cube 10 10 10)
holed-obj (m/difference obj (m/scale [1.005 1.2 1.005] box))
@stianeikeland
stianeikeland / chip-flashing-guide-nov-2018.md
Created Jan 20, 2019 — forked from verticalgrain/chip-flashing-guide-nov-2018.md
NextThingCo C.H.I.P. Flashing guide as of November, 2018
View chip-flashing-guide-nov-2018.md

Below are the steps required to flash a NextThingCo CHIP or PocketCHIP from the command line, as of November 2018. The web flasher no longer works, and there are numerous errors when flashing from the command line, mostly due to broken dependencies. The following method works for flashing a CHIP as of November 2018:

Note: Flashing must be done on Linux. Tested on Ubuntu and Rasparian. Mac OS seems to not work.

  1. Download and unpack the CHIP-SDK.zip from one of the following:
  1. Download and unpack CHIP-tools.zip from one of the following:
@stianeikeland
stianeikeland / qemu_osx_rpi_raspbian_jessie.sh
Created Jan 24, 2018 — forked from hfreire/qemu_osx_rpi_raspbian_jessie.sh
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
View qemu_osx_rpi_raspbian_jessie.sh
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
@stianeikeland
stianeikeland / leapyear.txt
Last active Sep 28, 2016
Kata bitshift 28. sept.
View leapyear.txt
Write a function that returns true or false depending on whether its input integer is a leap year or not.
Begin on the top and work your way through the rules.
1. A leap year is divisible by 4.
Ex: 2001 is not a leap year. 1996 is a leap year.
2. .. but leap years are not divisible by 100.
Ex: 1900 is not a leap year.
3. .. unless it's also divisble by 400.
@stianeikeland
stianeikeland / core.clj
Last active Aug 29, 2015
🍌🎹 Banana piano
View core.clj
(ns musikk.core
(:require [serial-port :as serial]
[overtone.live :refer :all]
[overtone.inst.sampled-piano :refer :all]))
(def port (serial/open "/dev/tty.usbserial-A800F185" 57600))
(defn chr->int [c]
(-> (char c)
(str)
View kake.rpy
1
| ||1 1 +
| | | ||& + | 2|
| | | | _|_ 5 | ]||1
| | _|_ | 2 _|_ 1|]
_|_ | | | 5 5 < _|_
7 & | | | | 1 & ] 4
| " | | ____| |**____| [ 1 <
| |___ | |____ | | | |____| -
_| | | | | | | |11]-2
View keybase.md

Keybase proof

I hereby claim:

  • I am stianeikeland on github.
  • I am stianeikeland (https://keybase.io/stianeikeland) on keybase.
  • I have a public key whose fingerprint is 5D10 C9C5 6178 0BA2 0D29 6AE4 795E B458 3552 AF2F

To claim this, I am signing this object:

View core.clj
(ns ticzip.core
(:require [clojure.zip :as z]))
(def game {:board (vec (repeat 9 nil))
:player :x})
(def next-player {:x :o, :o :x})
(defn- free-tiles [{:keys [board]}]
(->> board
You can’t perform that action at this time.