Skip to content

Instantly share code, notes, and snippets.

@DavidEGx
DavidEGx / alog.sh
Created February 24, 2013 16:56
Example of tailing a log file with some colors using grep
#!/bin/bash
# Tail an apache log an put some colors into the output
# www.davideg.es
shopt -s expand_aliases
alias grey-grep="GREP_COLOR='1;30' grep -E --color=always --line-buffered"
alias red-grep="GREP_COLOR='1;31' grep -E --color=always --line-buffered"
alias green-grep="GREP_COLOR='1;32' grep -E --color=always --line-buffered"
alias yellow-grep="GREP_COLOR='1;33' grep -E --color=always --line-buffered"
@robintemme
robintemme / README.md
Last active March 13, 2022 11:42
DHT11 temperature and humidity sensor on Raspberry Pi with a flask webserver

Minimalistic DHT11 Display on Raspberry Pi

Easily show your DHT11 Temperature and Humidity data on a webpage hosted on your Pi.

Dependencies

  • Python 2.7.x
  • Flask
  • Adafruit DHT11 Library
@bsodmike
bsodmike / README.md
Last active April 30, 2025 11:27
OC Nvidia GTX1070s in Ubuntu 16.04LTS for Ethereum mining

Following mining and findings performed on EVGA GeForce GTX 1070 SC GAMING Black Edition Graphics Card cards.

First run nvidia-xconfig --enable-all-gpus then set about editing the xorg.conf file to correctly set the Coolbits option.

# /etc/X11/xorg.conf
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
@xoseperez
xoseperez / rpi3_iot_server.md
Last active February 11, 2024 15:05
Raspberry Pi 3 with Mosquitto, Node-RED, InfluxDB, Grafana and Nginx (as a reverse proxy)
@chrisswanda
chrisswanda / WireGuard_Setup.txt
Last active October 29, 2025 14:46
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@stackexchange3301
stackexchange3301 / xmr-stak_cuda_setup.md
Last active November 28, 2021 12:57
Setting up xmr-stak miner on Ubuntu 18.04 with Nvidia card(s)

I wrote this tutorial because I've seen bits and chips of this topic, but never a full tutorial (especially not an up-to-date one).

This tutorial is intented for miners who want to mine Monero (or any other coin supported by xmr-stak) on a Ubuntu based system, with Nvidia cards (note: the tutorial works fine with CPU-only mining, just skip the driver installing part, and use -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF flags for cmake)

I assume You have a fresh install of Ubuntu, make sure Your system is up-to-date

sudo apt update && sudo apt upgrade

Install the latest version of the Nvidia driver avialable in the apt repository (which is 384 as of now)

esphome:
name: esp32_1
platform: ESP32
board: lolin32
wifi:
ssid: !secret ssid_iot
password: !secret password_iot
manual_ip:
static_ip: 192.168.0.110
@dlashua
dlashua / README.md
Created October 13, 2020 12:26
PyScript Candle Light Simulator

Use this in a Home Assistant Automation or Script to start a candle light effect on a bulb.

action:
  - service: pyscript.candle_light
    data:
      entity_id: light.living_overhead
      state: 'on' #use 'off' to stop the effect
      brightness: 12 #optional
 color_temp: 450 #optional
@SippieCup
SippieCup / install_multithreaded_chiapos.sh
Last active June 7, 2021 00:07
Safe way to install the multithreaded chiapos libary and rebuild chia-blockchain binaries
#!/bin/bash
# Note:
# I have not actually tested this installing into the
# chia-blockchain `install.sh` venv as I did not use it
# when I installed chia. I have only tested it in a
# test venv. YMMV!
if [ $# -eq 0 ]
then
@hansemro
hansemro / build_linux_toolchain.sh
Created October 19, 2022 10:07
Build script for nds32 v3 toolchain
# git clone -b ast-v3_2_5-release-v3 https://github.com/andestech/nds-gnu-toolchain
# cd nds-gnu-toolchain
# git submodule update --init --recursive
# patch binutils and gcc...
TARGET=nds32le-linux
PREFIX=`pwd`/nds32le-linux-glibc-v3
ARCH=v3
CPU=n9
BUILD=`pwd`/build-nds32le-linux-glibc-v3