Skip to content

Instantly share code, notes, and snippets.

@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"
}
],
@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 / 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 / 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 / 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 / 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 / burnusb.sh
Created September 29, 2016 09:27
dd usb
sudo umount /dev/sdXY
sudo dd bs=4M if=isoname.iso of=/dev/sdX && sync
@maxbelyanin
maxbelyanin / zyxel-openvpn-server.md
Last active May 19, 2023 14:31
ZyXel OpenVPN Configuration
  1. Update packages:
  • NDMSv2 +
  • OPKG -> Open Package support
  • OPKG -> Opkg kernel filesystems modules
  • OPKG -> Opkg kernel netfilter modules
  • OPKG -> Opkg kernel trafficcontrol modules
  • Networking -> IPv6
  • USB Storage -> *
  • Applications -> FTP Server (for upload firmware only)
  1. Make ext2/ext3 partition on USB-stick
@maxbelyanin
maxbelyanin / diffie-hellman-group1-sha1.md
Created March 22, 2017 17:31
diffie-hellman-group1-sha1

query the remote server to see what configuration is used as followed :

ssh -p22 -G user@<IP_Address>
ssh -p22 -o KexAlgorithms=+diffie-hellman-group1-sha1 user@<IP_Address>
@maxbelyanin
maxbelyanin / mscorefonts.md
Last active November 2, 2017 12:49
Install Microsoft Core Fonts for Ubuntu
sudo apt-get install ttf-mscorefonts-installer
cd /var/lib/update-notifier/package-data-downloads/partial
grep Url: /usr/share/package-data-downloads/ttf-mscorefonts-installer | awk '{print $2}' | sudo xargs -n 1 'wget'
cd -
sudo /usr/lib/msttcorefonts/update-ms-fonts /var/lib/update-notifier/package-data-downloads/partial/*
sudo rm -f /var/lib/update-notifier/package-data-downloads/partial/*
sudo mv /var/lib/update-notifier/package-data-downloads/ttf-mscorefonts-installer.FAILED /var/lib/update-notifier/package-data-downloads/ttf-mscorefonts-installer
sudo fc-cache -f -v