Skip to content

Instantly share code, notes, and snippets.

@sirbusby
sirbusby / zfs
Last active April 26, 2023 22:14
journalctl -b
# zfs_settings
Настройки zfs
arcstat - посмотреть статистику кэша:
nano /etc/modprobe.d/zfs.conf # настраиваем zfs:
Вносим в zfs.conf
options zfs zfs_arc_max=8589934592 # ограничиваем кэш
@Kirill
Kirill / crserver.service
Created September 4, 2018 08:58
/etc/systemd/system/crserver.service для Хранилища конфигураций 1С CentOS
[Unit]
Description=crserver
After=syslog.target
After=network.target
[Service]
Type=forking
WorkingDirectory=/opt/1C/v8.3/i386
User=usr1cv8
Group=grp1cv8
@brianherman
brianherman / jessie-mssql.md
Last active June 15, 2018 19:00
Debian Jessie and mssql-server

Download mssql from the microsoft website.

wget https://packages.microsoft.com/ubuntu/16.04/mssql-server/pool/main/m/mssql-server/mssql-server_14.0.1.246-6_amd64.deb

dpkg -i mssql-server_14.0.1.246-6_amd64.deb 

The next command will install dependancies.

sudo apt-get -f install 
renames.txt eol=crlf
*.bsl eol=crlf
@SmartFinn
SmartFinn / dhcp-leases-to-dns.rsc
Last active October 17, 2024 06:14
MikroTik (RouterOS) script for automatically setting DNS records for clients when they obtain a DHCP lease
# MikroTik (RouterOS) script for automatically setting DNS records
# for clients when they obtain a DHCP lease.
#
# author SmartFinn <https://gist.github.com/SmartFinn>
:local dnsTTL "00:15:00";
:local token "$leaseServerName-$leaseActMAC";
# Normalize hostname (e.g. "-= My Phone =-" -> "My-Phone")
# - truncate length to 63 chars
#!/bin/sh
# simple installer for Ubuntu 14.04 https://bitbucket.org/EvilBeaver/1script/wiki/Home
echo 'Starting wgeter latest develops'
wget --continue http://oscript.io/downloads/night-build/latest.zip
unzip -o latest.zip -d osc-engine

Title: Настройка сервера VPN L2TP/IPSec на Mikrotik RoutersOS Date: 2013-05-31 17:25 Category: Mikrotik Tags: mikrotik, vpn Slug: mikrotik-lt2p-vpn Summary: Краткое описание настройки сервера VPN L2TP/IPSec на Mikrotik RoutersOS c возможностью подключения с помощью встроенных VPN клиентов Windows 7, Mac OS X и IOS.

Alt Text

Замечение: Если несколько клиентов находятся за NAT, то только одно L2TP/IPSec соединение может быть установлено.

@mbrownnycnyc
mbrownnycnyc / nsclient_update.sh
Created May 24, 2013 15:41
script for use with `nsupdate` to update linux client DNS on a DNS server... in this instance, I am targeting a Windows Server DNS server 2003/2008/2012+. I have manually created the PTR and A records once, and granted the Everyone ACE the "Write" permission in the DACL of the PTR and A records.
#!/bin/sh
#original from http://community.spiceworks.com/topic/262635-linux-does-not-register-on-the-windows-ad-dns
# reply of Phil6196 Oct 1, 2012 at 12:41 AM (EDT)
ADDR=`/sbin/ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | sed -e s/.*://`
HOST=`hostname`
echo "update delete $HOST A" > /var/nsupdate.txt
echo "update add $HOST 86400 A $ADDR" >> /var/nsupdate.txt
echo "update delete $HOST PTR" > /var/nsupdate.txt
echo "update add $HOST 86400 PTR $ADDR" >> /var/nsupdate.txt
nsupdate /var/nsupdate.txt
@sirbrillig
sirbrillig / pgsql_backup.sh
Last active September 16, 2024 02:32 — forked from dangerousbeans/pgsql_backup.sh
Postgresql daily backup script.
#!/bin/bash
#
# Backup a Postgresql database into a daily file.
#
BACKUP_DIR=/pg_backup
DAYS_TO_KEEP=14
FILE_SUFFIX=_pg_backup.sql
DATABASE=
USER=postgres