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 | |
if [ "$#" -ne 3 ]; then | |
echo "Usage: $0 [ip address] [user name] [password]" | |
exit 1 | |
fi | |
IP=$1 | |
IPMI_USER=$2 | |
IPMI_PASS=$3 |
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
#include <MCP41xxx.h> | |
#include <SerialCommands.h> | |
#include <ArduinoUniqueID.h> | |
#include <DS18B20.h> | |
#define WDT | |
//#define MA_SMOOTH |
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
--- server/drivers/hd44780-i2c.c 2014-03-23 11:22:09.000000000 +0100 | |
+++ server/drivers/hd44780-i2c.c 2015-12-27 00:55:15.528659000 +0100 | |
@@ -85,10 +85,10 @@ | |
void i2c_HD44780_backlight(PrivateData *p, unsigned char state); | |
void i2c_HD44780_close(PrivateData *p); | |
-#define RS 0x10 | |
-#define RW 0x20 | |
-#define EN 0x40 | |
-#define BL 0x80 |
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 perl | |
use strict; | |
use warnings; | |
use Device::Modbus::RTU::Client; | |
my $client = Device::Modbus::RTU::Client->new( | |
port => '/dev/ttyUSB0', | |
baudrate => 9600, |
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 perl | |
use B::Deparse; | |
open( my $fh, '<', $ARGV[0] ) or die $!; | |
my $input = join '', <$fh>; | |
close($fh); | |
while ( $input =~ m/undef\(.*?\)\;eval/isg ) { | |
$input =~ s/undef\((.*?)\)\;eval\;/$1/sg; | |
$input = eval "$input"; |
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 | |
# Run the following from a terminal to install pacaur: | |
# $ curl -s https://gist.githubusercontent.com/ashevchuk/f801eaad5159135d5d36d6dee95f3a14/raw/pacaur_install.sh | sh | |
echo "Checking for system updates..." | |
sudo pacman -Syu | |
WORKDIR=$(mktemp -d /tmp/pacaur_install.XXXXXXXXX) |
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
For example, we need two VMs in the same network: | |
104.1.1.5 - debian linux | |
104.1.1.6 - host, where we want to install FreeBSD | |
00:50:66:be:70:c9 - ethernet address, where we installing FreeBSD | |
Network: | |
104.1.1.0 - our network | |
255.255.255.0 - our network mask | |
104.1.1.255 - our network broadcast address | |
104.1.1.1 - our network gateway |