This file contains hidden or 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 | |
| #Pre-requisites: file named hourly_temp, smtp client | |
| #touch hourtemp_email | |
| cat /dev/null>/home/pi/hourtemp_email | |
| hourlytemp=$(awk '{print $1/1000 * 1.8 + 32}' /sys/class/thermal/thermal_zone0/temp | awk '{printf("%d\n",$1 + 0.5)}') | |
| export smtpemailfrom=user@domain.com | |
| export sensormailto=recipient@gmail.com | |
| export sensorsubject=TEMP:$hourlytemp |
This file contains hidden or 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
| View Images - basic - numbered | |
| --------------------------------------------------------- | |
| <?php | |
| $files = glob("*.jpg"); | |
| /* for ($i=1; $i<count($files); $i++) */ | |
| for ($i=1; $i<=10; $i++) | |
| { | |
| $num = $files[$i]; | |
| list($width, $height, $type, $attr) = getimagesize("'.$num.'"); | |
| $fn = getimagesize("'.$num.'"); |
This file contains hidden or 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
| Brute Find | |
| #Use: | |
| #sudo ./brutefind.sh > /dev/null 2>&1 | |
| #find /sys/ -type f | while read f; do | |
| #find /proc/ -type f | grep -v '/proc/^[0-9]\{5\}$' | while read f; do | |
| find /proc/ -type f | while read f; do | |
| #Grep quietly on the results (read f) of files. Count the numbers, contained within. |
This file contains hidden or 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
| #1 | |
| : sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu' | |
| hw.machine: amd64 | |
| hw.model: Intel(R) Celeron(R) CPU 1037U @ 1.80GHz | |
| hw.ncpu: 2 | |
| hw.machine_arch: amd64 | |
| #2 Test for temp | |
| :/sbin/sysctl hw.acpi.thermal.tz0.temperature | |
| :/sbin/sysctl -a | grep "^dev.*0.temperature" |
This file contains hidden or 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
| #Copied from https://www.geekality.net/2016/03/07/excel-function-for-nslookup-in-worksheet/ | |
| #Usage: Given an IP in cell A1, to get the hostname: =NSLookup(A1; 2) | |
| Public Function NSLookup(lookupVal As String, Optional addressOpt As Integer) As String | |
| Const ADDRESS_LOOKUP = 1 | |
| Const NAME_LOOKUP = 2 | |
| Const AUTO_DETECT = 0 | |
| 'Skip everything if the field is blank | |
| If lookupVal <> "" Then | |
| Dim oFSO As Object, oShell As Object, oTempFile As Object |
This file contains hidden or 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
| #Taken from: http://scriptorium.serve-it.nl/view.php?sid=68 | |
| #and | |
| #https://www.mrexcel.com/forum/excel-questions/391426-ping-list-servers-excel.html | |
| Option Explicit | |
| 'Requires references to Microsoft Scripting Runtime and Windows Script Host Object Model. | |
| 'Set these in Tools - References in VB Editor. | |
| Public Function PingResult(sHost As String) As String |
This file contains hidden or 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 python2 | |
| #Squelch matplotlib / seaborne error | |
| import warnings | |
| warnings.filterwarnings("ignore") | |
| import matplotlib | |
| import matplotlib.pyplot as plt | |
| import pandas | |
| import MySQLdb |
This file contains hidden or 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 | |
| #The mysql connection string shown, assumes you are using a .cnf file in your home directory | |
| # Set set -xv to enable script debugging | |
| #set -xv | |
| ds=0 | |
| i=0 | |
| #Pull the current stock price from the nasdaq site |
This file contains hidden or 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 | |
| # ************************************************** | |
| # FILENAME: install_UFW.sh | |
| # DATE: DEC 2021 | |
| # AUTHOR: RCombs | |
| # | |
| # PURPOSE: Install UFW on Raspberry Pi | |
| # ************************************************** |
This file contains hidden or 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 | |
| # ********************************************* | |
| # FILENAME: install_mysql_pi.sh | |
| # DATE: Sep 2021 | |
| # AUTHOR: RCombs | |
| # | |
| # PURPOSE: Install mysql Client on Raspberry Pi | |
| # ********************************************* |