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 | |
### BEGIN INIT INFO | |
# Provides: serial_hostname | |
# Required-Start: $local_fs | |
# Required-Stop: | |
# X-Start-Before hostname | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Set hostname based on /boot/serial_hostname.txt | |
# Description: Read the machines hostname from /boot/serial_hostname.txt, |
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 | |
### BEGIN INIT INFO | |
# Provides: anewhost.sh | |
# Required-Start: | |
# Required-Stop: | |
# Should-Start: | |
# Default-Start: S | |
# Default-Stop: | |
# Short-Description: Changes /etc/hostname /etc/hosts if /boot/newhost found | |
# Description: /boot/newhost file to change the |
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 | |
### BEGIN INIT INFO | |
# Provides: hostname | |
# Required-Start: | |
# Required-Stop: | |
# Should-Start: glibc | |
# Default-Start: S | |
# Default-Stop: | |
# Short-Description: Set hostname based on /etc/hostname | |
# Description: Read the machines hostname from /etc/hostname, and |
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 | |
###################################################################### | |
# Phonehome script to obtain IP of home router | |
# | |
# Call with wget from your internal machine | |
# with the command: | |
# wget -t 10 http://yourwebsite/phonehome.php?c=1234&cmd=1 -O /dev/null | |
# | |
###################################################################### | |
$SY = array(); |
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 | |
################################################# | |
# Switch Test #1 | |
# | |
# Sets up the GPIO 4 port to check for a button | |
# press. Loops until the button is pressed | |
# | |
# Ref: | |
# http://rpi.tnet.com/project/hardware/project001 | |
# |
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
/* | |
* gpio.c: | |
* Swiss-Army-Knife, Set-UID command-line interface to the Raspberry | |
* Pi's GPIO. | |
* Copyright (c) 2012 Gordon Henderson | |
*********************************************************************** | |
* This file is part of wiringPi: | |
* https://projects.drogon.net/raspberry-pi/wiringpi/ | |
* | |
* wiringPi is free software: you can redistribute it and/or modify |
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 | |
### BEGIN INIT INFO | |
# Provides: tightvncserver | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: start vnc server | |
# Description: | |
### END INIT INFO |
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 | |
###################################################################### | |
# Raspberry Pi | |
# | |
# Gross Script by Dweeber (Kevin Reed) <[email protected]> | |
# V1.0 2012-09-19 | |
# | |
# Use the vcgencmd to obtain the Temp of the SOC | |
# then calculates the F value using bc. | |
# |
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
DISK_SIZE="4" # set this to the card size in nominal GB | |
# or: DISK_SIZE="$(($(sudo blockdev --getsz /dev/mmcblk0)/2048/925))" | |
PART_START="$(sudo parted /dev/mmcblk0 -ms unit s p |grep "^2" |cut -f2 -d:)" | |
[ "$PART_START" ] || exit 1 | |
PART_END="$((DISK_SIZE*925*2048-1))" | |
[ "$PART_END" -ge 3788799 ] || exit 1 | |
printf "d\n2\nn\np\n2\n$PART_START\n$PART_END\np\nw\n" |sudo fdisk /dev/mmcblk0 |
NewerOlder