This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo -n "Charge current limit is " | |
dbus -y com.victronenergy.settings /Settings/SystemSetup/MaxChargeCurrent GetValue | |
exit 0 | |
fi | |
dbus-send --system --type=method_call --dest=com.victronenergy.settings /Settings/SystemSetup/MaxChargeCurrent com.victronenergy.BusItem.SetValue "int32:$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# This script reads battery power from Venus OS DBus | |
# and turns off smart sockets to shed heavy loads when | |
# the battery is discharging | |
import dbus | |
import requests | |
system_bus = dbus.SystemBus() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Was: | |
_______ ______ _____ _____ ______ ____ _____ __ __ _____ _ _ _____ _ _ _____ _______ _____ _____ ______ _____ | |
|__ __| ____| __ \| __ \ /\ | ____/ __ \| __ \| \/ | |_ _| \ | | __ \| | | |/ ____|__ __| __ \|_ _| ____|/ ____| | |
| | | |__ | |__) | |__) | / \ | |__ | | | | |__) | \ / | | | | \| | | | | | | | (___ | | | |__) | | | | |__ | (___ | |
| | | __| | _ /| _ / / /\ \ | __|| | | | _ /| |\/| | | | | . ` | | | | | | |\___ \ | | | _ / | | | __| \___ \ | |
| | | |____| | \ \| | \ \ / ____ \| | | |__| | | \ \| | | | _| |_| |\ | |__| | |__| |____) | | | | | \ \ _| |_| |____ ____) | | |
|_| |______|_| \_\_| \_\/_/ \_\_| \____/|_| \_\_| |_| |_____|_| \_|_____/ \____/|_____/ |_| |_| \_\_____|______|_____/ | |
Fixed: | |
_______ ______ _____ _____ _ ______ ____ _____ __ __ _____ _ _ _____ _ _ _____ _______ _____ _____ ______ _____ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requires underscore-cli https://github.com/ddopson/underscore-cli | |
alias btc='curl -s https://blockchain.info/ticker | underscore extract USD.15m | xargs printf "%.2f\n"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
set -e | |
STROKECOLOR="white" | |
STROKEWIDTHDIV=38 | |
STROKEPOINTOFFSETDIV=25 | |
if [ "$#" -ne 3 ]; then | |
echo "Usage:" | |
echo "$0 left_image right_image composed_image" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
["Esc","!\n1","@\n2","#\n3","$\n4","%\n5","^\n6","&\n7","*\n8","(\n9",")\n0","—\n–","+\n=",{w:1.5},"Del",{x:0.5},"Reset"], | |
[{w:1.5},"Tab","Q","W","E","R","T","Y","U","I","O","P","{\n[","}\n]","|\n\\"], | |
[{w:1.75},"Control","A","S",{n:true},"D","F","G","H","J",{n:true},"K","L",":\n;","\"\n'",{w:1.75},"Return"], | |
[{w:2.25},"Shift","Z","X","C","V","B","N","M","<\n,",">\n.","?\n/",{w:2.25},"Shift"], | |
["Caps Lock","~\n`",{x:1},"🍏",{a:7,w:5.5},"",{a:4},"🍎","←",{n:true},"→","↓","↑"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
#define NUMBER_OF_SAMPLES 4410 // for 44100 Hz sample rate and 10Hz min f. | |
#define MAX_VALUE 0xFFFFFF // 24-bit samples | |
#define MID_VALUE (MAX_VALUE/2) | |
#define DC_OFFSET (MID_VALUE) // set to 0 for no offset | |
// Generates a wavetable (a single wavecycle) of a sine wave. | |
// compile: gcc -o generate-sine generate-sine.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
system_profiler SPUSBDataType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert diagram.png -colorspace gray +level-colors white,blue blueprint.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set number | |
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab | |
syntax on | |
if match($TERM, "screen")!=-1 | |
set term=xterm | |
endif |
NewerOlder