Skip to content

Instantly share code, notes, and snippets.

View ashevchuk's full-sized avatar

Andrew Shevchuk ashevchuk

View GitHub Profile
@ashevchuk
ashevchuk / gist:8e9d43277f30ffb993d5
Last active May 5, 2016 01:45
FreeBDS installation process @cloudatcost VPS provider
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
@ashevchuk
ashevchuk / pacaur_install.sh
Last active March 8, 2019 17:18 — forked from tadly/pacaur_install.sh
A simple shell script to quickly / easily install "pacaur" on archlinux
#!/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)
@ashevchuk
ashevchuk / deo.pl
Last active March 8, 2019 17:30
Stunnix Perl deobfuscator
#!/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";
@ashevchuk
ashevchuk / voltage.pl
Last active May 3, 2018 08:03
SDM220 modbus
#!/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,
@ashevchuk
ashevchuk / hd44780-i2c-pcf8574t.c.patch
Created May 15, 2018 23:14 — forked from padcom/hd44780-i2c-pcf8574t.c.patch
Patch to make LCDproc work with Chineese version of the HD44780 extender which has different wiring than the original version
--- 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
@ashevchuk
ashevchuk / rack_chiller_ctl
Last active March 10, 2024 18:48
Rack chiller cooling system controller firmware
#include <MCP41xxx.h>
#include <SerialCommands.h>
#include <ArduinoUniqueID.h>
#include <DS18B20.h>
#define WDT
//#define MA_SMOOTH
@ashevchuk
ashevchuk / rac_ipmi_jviewer.sh
Last active May 7, 2024 00:17
Aster MegaRAC IPMI q&d fix for broken iKVM jviewer.jnlp
#!/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