Skip to content

Instantly share code, notes, and snippets.

@korjavin
korjavin / MyConfig.pm
Last active May 6, 2019 15:46
perl reload
package MyConfig;
use strict;
use base 'Exporter';
BEGIN {
our @EXPORT = qw($DB_USER );
}
our @EXPORT;
@korjavin
korjavin / gist:5036048
Created February 26, 2013 05:03
sata rescan
echo "- - -" > /sys/class/scsi_host/host*/scan
@korjavin
korjavin / gist:5045121
Created February 27, 2013 04:37
centerim
sudo -u nagios /usr/local/bin/screen -d -m /usr/local/bin/centerim -b /usr/local/etc/nagios/.centerim
@korjavin
korjavin / ifconfig.txt
Last active December 14, 2015 06:58
freebsd_em_error
# ifconfig em1
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
ether 00:1e:67:48:94:44
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
@korjavin
korjavin / gist:5062374
Created March 1, 2013 03:58
linux_custom_route
#ip ro list table isp2
default via 10.64.64.64 dev ppp0 src 10.68.56.108
#ip ru
0: from all lookup local
32765: from all fwmark 0x2 lookup isp2
32766: from all lookup main
32767: from all lookup default
#iptables -L -t mangle
@korjavin
korjavin / gist:5079765
Created March 4, 2013 03:47
usb_reset
echo 0 > /sys/bus/usb/devices/2-*/authorized
echo 1 > /sys/bus/usb/devices/2-*/authorized
@korjavin
korjavin / md5.pl
Created March 20, 2013 11:54
auth_req_verify
use utf8;
use Digest::MD5;
sub auth_req_verify {
my ( $packet, $secret, $prauth ) = @_;
return 1
if Digest::MD5::md5(
substr( $packet, 0, 4 ) . $prauth . substr( $packet, 20 ) . $secret )
eq substr( $packet, 4, 16 );
apt-get -o Acquire::Check-Valid-Until=false update
deb http://snapshot.debian.org/archive/debian/20110705T091435Z/ wheezy main
echo printf "[%lu] DISABLE_HOST_CHECK;Leningradskiy_28.1_516_void\n" `date +%s` >> /var/spool/nagios/rw/nagios.cmd
@korjavin
korjavin / 1.md
Created September 14, 2013 05:22
  • Написать в г+
  • Поставить галочку
  • Поставить еще галочку
  • incomplete
  • Profit!!