Skip to content

Instantly share code, notes, and snippets.

@maxbelyanin
maxbelyanin / raid_xenserver.md
Created February 25, 2016 12:11
raid xenserver
mdadm --stop /dev/md3
mdadm --assemble --scan
watch -n 1 cat /proc/mdstat
@maxbelyanin
maxbelyanin / unban_fail2ban.md
Created February 17, 2016 16:47
Unban from fail2ban
iptables -L -n
fail2ban-client status
fail2ban-client set YOURJAILNAMEHERE unbanip IPADDRESSHERE
@maxbelyanin
maxbelyanin / wireshark_remote.md
Created January 26, 2016 13:10
Wireshark remote capture
mkfifo /tmp/sharkfin
wireshark -k -i /tmp/sharkfin & ssh user@remote-host "dumpcap -P -w - -f 'not tcp port 22'" > /tmp/sharkfin
@maxbelyanin
maxbelyanin / man.md
Last active January 21, 2016 07:08
Xen 6.5 software Raid – installation

1.Install XenServer 6.0.2 on /dev/sda and do NOT configure any local storage

2./dev/sda should containt three partitions, please verify with the following command:

sgdisk -p /dev/sda

3.The first partition is used for XenServer installation, the second one is used for backups during XenServer upgrades. If third partition is not created? create it with following command:

sgdisk --new=3:16779264:3907029134 /dev/sda &&
sgdisk --typecode=3:fd00
@maxbelyanin
maxbelyanin / ntp.bat
Created August 18, 2015 13:14
Starts the Windows NTP-Server
reg add "HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config" /v "AnnounceFlags" /t REG_DWORD /d 5 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer" /v "Enabled" /t REG_DWORD /d 1 /f
net stop w32time && net start w32time
@maxbelyanin
maxbelyanin / Preferences.sublime-settings
Last active August 29, 2015 14:23
Preferences.sublime-settings
{
// Additional situations to trigger auto complete
"auto_complete_triggers":
[
{
"characters": ".@",
"selector": "source.coffee, source.litcoffee, source.coffee.md"
}
],