Skip to content

Instantly share code, notes, and snippets.

; Disables Capslock
SetCapsLockState, AlwaysOff
; Allows navigation using capslock + IJKL while keeping other modifiers intact like shift and ctrl
Capslock & I::Send {Blind}{Up}
Capslock & K::Send {Blind}{Down}
; Capslock & J::Send {Blind}{Left}
; Capslock & L::Send {Blind}{Right}
@8
8 / settings.json
Last active February 16, 2020 23:25
Windows Terminal Configuration
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"profiles":
@8
8 / plot.csx
Last active December 9, 2019 07:21
Script to help setup Oxyplot for use in C# Scripts (.csx) using dotnet-script
#r "nuget: OxyPlot.Core.Drawing, 2.0.0"
using OxyPlot;
using OxyPlot.Axes;
using OxyPlot.Core.Drawing;
using OxyPlot.Series;
/* export functions */
static PlotModel ExportToPng(this PlotModel plot, string file, int width = 1024, int height = 768)
{
PngExporter.Export(plot, file, width, height, OxyColors.White);
@8
8 / led_array.sh
Created November 19, 2014 15:36
RasPiComm+ Example Project: Controlling a LED-Array with a potentiometer
#!/bin/bash
# RasPiComm+ Example Project LED Array
# prints general info
function print_info() {
echo "RasPiComm+ Example Project 1"
echo "Controlling a LED-Array with a potentiometer"
echo ""
}
@8
8 / get_status.sh
Last active August 29, 2015 14:09
script to get the indiegogo.com campaign status
#/bin/bash
# the url of the campaign
CAMPAIGN="raspicommplus-all-in-one-raspberry-pi-extension"
# use the first argument as the campaign name
if [[ "$1" != "" ]]; then
CAMPAIGN="$1"
fi
@8
8 / free-ttyAMA0.sh
Created September 19, 2014 11:40
makes /dev/ttyAMA0 usable on a new raspbian image by freeing it from logging kernel output
#!/bin/bash
# free-ttyAMA0 script written by mdk
# http://www.amescon.com
# this script configures the raspbian image to not use the ttyAMA0 port for debugging purposes and makes it useable in userland
function configure_ttyAMA0_fix_cmdlinetxt() {
local file="/boot/cmdline.txt"
@8
8 / rpc-rtc-inst.sh
Created May 2, 2013 10:13
shell script for configuring raspicomm rtc clock on startup
#! /bin/sh
# The content of the raspberry pi revision
# Content of the file /etc/init.d/rtc.sh
RTC_SCRIPT_HEADER="#! /bin/sh\n\n### BEGIN INIT INFO\n# Provides: rtc\n# Required-Start: $remote_fs $syslog\n# Required-Stop: $local_fs\n# Default-Start: 2 3 4 5\n# Default-Stop: 0 1 6\n# Short-Description: Creates the real time clock i2c device when executed\n### END INIT INFO\n\n# Activate the real time clock\n"
RTC_SCRIPT_BODY_REVISION1="echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device"
RTC_SCRIPT_BODY_REVISION2="echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device"
RTC_SCRIPT_REVISION1=$RTC_SCRIPT_HEADER$RTC_SCRIPT_BODY_REVISION1
@8
8 / rs485_install_driver.sh
Created February 25, 2013 12:22
RasPiComm: Shell script to install the Rs-485 device driver
#
# This script installs the RasPiComm Rs-485 Device Driver that is packaged as a debian package from http://packages.amescon.com
#
# Check if http://packages.amescon.com is already added to the list of package servers
INSTALLED=`cat /etc/apt/sources.list | grep packages.amescon.com -c`
if [ $INSTALLED = 0 ] ; then
echo Installing http://packages.amescon.com as a package source
# Add http://packages.amescon.com to the apt-get package servers
echo "deb http://packages.amescon.com/ ./" >> /etc/apt/sources.list
@8
8 / joystick_gpio_setup.sh
Created February 25, 2013 11:35
RasPiComm: Shell Script to configure the gpios of the RaspberryPi for Joystick use
#
# This shell script configures the gpio's for use with joystick
#
# Export the gpio's into the file system
echo 4 > /sys/class/gpio/export
echo 22 > /sys/class/gpio/export
echo 23 > /sys/class/gpio/export
echo 24 > /sys/class/gpio/export
echo 25 > /sys/class/gpio/export