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
[Unit] | |
Description=Linode Longview | |
After=syslog.target network.target | |
[Service] | |
Type=forking | |
PIDFile=/run/longview.pid | |
ExecStart=/opt/linode/longview/Linode/Longview.pl | |
[Install] |
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 | |
function dagd { | |
if [ $1 -eq '-6' ]; then | |
curl -m 2 -s "http://da.gd/$2" | |
else | |
curl -m 2 -s -4 "http://da.gd/$2?strip" | |
fi | |
} | |
function remote_network { | |
# set some magical temporary stuff |
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
raw_interfaces=$(ifconfig | | |
perl -ane ' | |
END{print "\042", join("\042 \042", @a), "\042\n"} | |
$a[$c++] = $1 if /^(\w+)/; | |
') | |
interfaces=($raw_interfaces) | |
for interface in "${interfaces[@]}" | |
do | |
address=$(ifconfig `echo $interface | sed "s/\"//g"` | grep inet) | |
if [ $? -eq 0 ]; then |
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 | |
# add to the shared library search path | |
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/lib | |
CONF_DIRECTORY=/etc/wview | |
RUN_DIRECTORY=/var/wview | |
WVIEW_INSTALL_DIR=/usr/bin | |
### BEGIN INIT INFO | |
# Provides: wview | |
# Required-Start: $local_fs $network $time $syslog |
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
/var/log/remote/*/*.log { | |
missingok | |
daily | |
rotate 1 | |
ifempty | |
create 0600 root root | |
copytruncate | |
compress | |
} |
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 | |
echo "----------------------" | |
date | |
temp=$(/opt/vc/bin/vcgencmd measure_temp | awk -F"=" '{print $2}' | awk -F"'" '{print $1}') | |
echo "temp.value $temp" | |
for volt in core sdram_c sdram_i sdram_p | |
do | |
voltage=$(/opt/vc/bin/vcgencmd measure_volts $volt | awk -F"=" '{print $2}' | tr -d "V") | |
echo "volt$volt.value $voltage" | |
done |
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
<?php | |
function better_parse_ini_file($filename){ | |
$ini_array = array(); | |
if(file_exists($filename)){ | |
$file_contents = file_get_contents($filename); | |
} else { | |
return false; | |
} | |
// we will now process the file |
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
High Altitude Weather Balloon - Pi Edition | |
------------------------------------------------------------------------------------ | |
Sensors: | |
------------------------------------------------------------------------------------ | |
MPU6050 - Provides 3 Axis Accelerometer, 3 Axis Gyro, Thermometer | |
SEN-11282 - Provides Barometric Pressure Temperature Altitude Sensing | |
UM96 - Provides Serial, data transfer (replace with audio out from pi) | |
Parallax GP - Provides Time, Provides Elevation, Provides Location | |
CMOS IR CAM - Provides Camera Capabilities (Find better?) | |
------------------------------------------------------------------------------------ |
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
RX bytes:282576444 (269.4 MiB) TX bytes:300322516 (286.4 MiB) | |
RX bytes:245801472 (234.4 MiB) TX bytes:22882002 (21.8 MiB) | |
RX bytes:4660828 (4.4 MiB) TX bytes:4660828 (4.4 MiB) | |
10:29:14 up 1 day, 15:15, 1 user, load average: 0.16, 0.28, 0.37 |
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 | |
lease_file="/var/lib/dhcp/dhcpd.leases" | |
function get_client_name(){ | |
ip=$1 | |
client=`cat $lease_file|grep -A 12 $ip|grep client|uniq|sed -e "s/^.*\"\(.*\)\".*$/\1/"` | |
if [ ! "$client" = "" ]; then | |
echo "$client" | |
else |