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
// | |
// An Arduino sketch for an IoT node that broadcasts sensor values via | |
// 433 MHz radio signals | |
// The RCSwitch library is used for the transmissions | |
// The Narcopleptic library is used for power save during delay | |
// Sensor values are fetched from an BPM180/085 sensor via i2C | |
// | |
#include <Wire.h> | |
#include <Adafruit_BMP085.h> |
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 python3 | |
import paho.mqtt.publish as publish | |
from subprocess import check_output | |
from re import findall | |
import psutil | |
import sys | |
def get_temp(): | |
temp = check_output(["vcgencmd","measure_temp"]).decode("UTF-8") | |
return(findall("\d+\.\d+",temp)[0]) |
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
""" | |
""" | |
import asyncio | |
import logging | |
import time | |
import random | |
import pickle | |
import os.path | |
from datetime import timedelta |
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 | |
# | |
# Import all SSH keys from LP | |
# | |
PREFIX=~ | |
SSH_ASKPASS=$PREFIX/bin/lp-askpass.sh | |
export SSH_ASKPASS | |
# This is needed to force ssh-add to honor our SSH_ASKPASS. | |
DISPLAY=foo | |
export DISPLAY |
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/bash | |
# Credit and special thanks to Carsten Rieger from https://www.c-rieger.de/ | |
# for creating this script. | |
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on | |
BACKUP_STORE=/backup_work_dir | |
ARCHIVE_STORE=/home/ubuntuusername/backup_dir | |
CURRENT_TIME_FORMAT="%w" | |
echo "START: $(date)" | |
FOLDERS_TO_BACKUP=( | |
"/root/" |
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
from pocketsphinx.pocketsphinx import * | |
from sphinxbase.sphinxbase import * | |
import os | |
import pyaudio | |
import wave | |
import audioop | |
from collections import deque | |
import time | |
import math |
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/bash | |
# | |
# Creates an SSH key on a client machine, applies the appropriate file permissions, | |
# copies to the local ~/.ssh directory, & copies to specified server | |
# | |
# parameters: | |
# ..1 newKeyFileName | |
# ..2 user@server | |
# | |
# usage : |
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 | |
# Enable and disable HDMI output on the Raspberry Pi | |
is_off () | |
{ | |
tvservice -s | grep "TV is off" >/dev/null | |
} | |
case $1 in |
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
/**The MIT License (MIT) | |
Copyright (c) 2016 by Daniel Eichhorn | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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 xdg-open | |
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=YakYak | |
Comment=Desktop client for Google Hangouts | |
GenericName=Hangouts Client | |
Exec=/opt/yakyak-linux-x64/yakyak | |
Icon=/opt/yakyak-linux-x64/resources/app/icons/[email protected] | |
Terminal=false |