$ hcitool dev
Devices:
hci0 00:1A:7D:DA:71:13
$ sudo hcitool -i hci0 lescan
LE Scan ...
54:60:09:4A:6D:D9 (unknown)
^C
#!/usr/bin/env python3 | |
# Songka game solver | |
# [Game Rules](https://www.wikihow.com/Play-Congkak) | |
# [Songka_Plus on Android](https://play.google.com/store/apps/details?id=net.azurewebsites.sungka.twa&hl=en_US) | |
# This is pretty much a solved game. The player that goes first will always win if he plays optimally. | |
# There are several sequences to achieve this. The following is one of them: | |
# Solution found: 41 turns, 93 seeds in the storehouse | |
# 0 1 4 1 0 4 | |
# 1 1 2 3 2 0 |
#!/usr/bin/env python3 | |
# | |
# This program is a solver for the [SmartGames IQ-Stars](https://www.smartgames.eu/nl/1-speler-spellen/iq-stars) puzzle game. | |
# 381 unique solutions can be found. My Thinkpad L580 takes 536s to find them. | |
import math, sys | |
from timeit import default_timer as timer | |
def place_block(block, color, x, y): | |
# Check if the block can be placed on the board at the given coordinates |
#!/usr/bin/env python3 | |
# | |
# This program prints out three colums of exercises, each time with the result next to it. | |
# Each column exists of 66 exercises. | |
# | |
# 1. Run the program | |
# 2. Print out the created text file to a DINA4-paper | |
# 3. Fold back the results of the first column | |
# 4. Fill in the results for the first column. | |
# 5. Unfold and check the results |
#!/bin/bash | |
function current_session_time() { | |
# Get the duration of the current logon session in seconds | |
username="$1" | |
info=$(last -Fn1 $username) | |
# Get the current time and the session time in seconds | |
current_time=$(date +%s) | |
session_time=$(date -d "$(echo $info | awk '{print $5, $6, $7, $8}')" +%s) |
#!/bin/bash | |
# Cronjobs for each user can be edited with "crontab -e" | |
battery_level=$(cat /sys/class/power_supply/BAT0/capacity) | |
battery_level_threshold=35 | |
if (( $battery_level > $battery_level_threshold )); then | |
echo $(date -u) ": Battery level ok:" $battery_level"%" | |
exit 0 |
OpenStreetMap can be used to create free maps for your Garmin. You could download those maps from services like OpenStreetMap.nl. Those maps contain a lot of unnecessary features (houses, woods) that make it hard to follow your route (see the screenshots). So if you want a map that makes it easy for you to keep on track, follow this guide.
You could use XAPI Query Builder to draw a bounding box and download your maps, but that frequently fails because servers are overloaded. It's better to download a recent map from Geofabrik.