Skip to content

Instantly share code, notes, and snippets.

View kapb14's full-sized avatar
😤

Aleksandr Karushin kapb14

😤
View GitHub Profile
@kapb14
kapb14 / reverse_ssh-tunnel_connect
Created March 14, 2016 08:07
callback подключение по SSH через туннель
#
# >> добавить в /etc/rc.local (или что-то типа того):
#
# turn on verbose logging
export AUTOSSH_DEBUG
# Sets the connection monitoring port.
export AUTOSSH_PORT=61000
# specifies the connection poll time in seconds; default is 600 seconds.
export AUTOSSH_POLL=300
@kapb14
kapb14 / thecus_commands.txt
Created March 10, 2016 07:43
THECUS useful commands and binaries locations
cd /var/log; tail -f log.* samba/samba.{n,s}mbd samba/samba.winbindd
@kapb14
kapb14 / gist:4feb7ea9a8c7872e1dbb
Created March 10, 2016 07:42
screenrc sample
startup_message off
vbell off
hardstatus alwayslastline "%{=b}%{G} %{b}%w %=%{kG}%C%A %D,%d/%m/%y"
shelltitle "Shell"
defscrollback 5024
@kapb14
kapb14 / gist:09180f9f48965a047b8c
Created March 10, 2016 07:42
SQL Server 2014 unattend installation sample
::
cd /d Z:
cd Z:\SQL2014sp1entEn
setup.exe /Q /IACCEPTSQLSERVERLICENSETERMS /ACTION=install /FEATURES=SQL,AS,RS,IS,Tools
setup.exe /UpdateEnabled=0
@kapb14
kapb14 / gist:1b2ac855cbe764b20ce6
Created March 10, 2016 07:40
use 'read' in bash scripts
#
# http://wiki.bash-hackers.org/commands/builtin/read?s[]=read
#
> read -e -i "[txt_before]" -p "answer: " -t 10 myvariable ; echo $myvariable
answer: [txt_before]fuck
[txt_before]fuck
@kapb14
kapb14 / iptables rule with comments + DNAT rule function
Created February 29, 2016 13:15
Add Comments to iptables Rules + Bash Function to add DNAT rule with comment
Add Comments to iptables Rules:
Depending on your distribution, you may need to load the 'ipt_comment' or 'xt_comment' modules into your running kernel first.
like: 'modprobe ipt_comment'
EXAMPLE:
iptables -A INPUT -j DROP -p tcp --dport 22222 -m comment --comment "test iptables rule comment"
@kapb14
kapb14 / xshell logon action example
Created February 26, 2016 11:52
XShell EXPECT-like Logon Action
###
# COLORS:
# red=$(tput setaf 1)
# grn=$(tput setaf 2)
# ylw=$(tput setaf 3)
# reset=$(tput sgr0)
# EXPECT:
Last login:
@kapb14
kapb14 / Sharepoint2013 UPSS 'ERR_START_SERVICE'
Created February 18, 2016 19:21
Sharepoint 2013 User Profile Synchronization Service ["stuck on starting"]
# Sharepoint 2013 User Profile Synchronization Service ["stuck on starting"]
# 18.02.2016
02.18.2016 22:12:00.88 OWSTIMER.EXE (0x0668) 0x06CC SharePoint Portal Server User Profiles ohvm Medium LanguageAndRegionSyncLog409000000001 WebApp my.stada-dev.sp.adv.ru(0fde4fae-14ed-4834-a2a3-af2540e21a20), ContentDB WSS_Content_MySites(42c3e070-0984-429e-a869-c997d71c9e97): Beginning synch of ContentDB 8a7f609d-3d76-4065-adfa-44ce7ca3babb
02.18.2016 22:12:00.89 OWSTIMER.EXE (0x0668) 0x06CC SharePoint Portal Server User Profiles ohvp Medium LanguageAndRegionSyncLog409000000002 WebApp my.stada-dev.sp.adv.ru(0fde4fae-14ed-4834-a2a3-af2540e21a20), ContentDB WSS_Content_MySites(42c3e070-0984-429e-a869-c997d71c9e97): Finished synch of ContentDB. 8a7f609d-3d76-4065-adfa-44ce7ca3babb
02.18.2016 22:12:00.90 OWSTIMER.EXE (0x0668) 0x06CC SharePoint Portal Server User Profiles ohvm Medium LanguageAndRegionSyncLog410000000001 WebApp SP - stada-dev.sp.adv.ru(6285eea7-eb10-4983-a4f1-a14827b82200), ContentDB WSS_Content(e32965eb-27
@kapb14
kapb14 / DMARC setup
Last active February 18, 2016 16:52
Настройка DMARC
# Настройка DMARC
[удобный визард](https://www.unlocktheinbox.com/dmarcwizard/)
У меня получилось так:
"v=DMARC1; p=none; sp=none; rua=mailto:[email protected]; ruf=mailto:[email protected]; rf=afrf; pct=100; ri=86400"
### If you run Bind:
@kapb14
kapb14 / gist:b9aef46824ba3ee37e67
Created January 29, 2016 14:42
ошибка при установке шарика
This file has been truncated, but you can view the full file.
Begin trace logging for SharePoint 2010 Products Configuration Wizard. Version 15.0.4569.1503
01/29/2016 16:56:53 1 INF Entering function PsconfigUserInterfaceMain.Main
01/29/2016 16:56:53 1 INF Entering function Common.SetCurrentThreadCultureToInstalledCulture
01/29/2016 16:56:54 1 INF Entering function Common.SetThreadCultureToInstalledCulture
01/29/2016 16:56:55 1 INF Current thread culture is Russian (Russia), current thread ui culture is English (United States), installed culture is English (United States)
01/29/2016 16:56:55 1 INF Changing current thread culture to English (United States)
01/29/2016 16:56:55 1 INF Leaving function Common.SetThreadCultureToInstalledCulture
01/29/2016 16:56:55 1 INF The current ui culture English (United States) is NOT right to left
01/29/2016 16:56:55 1 INF Leaving function Common.SetCurrentThreadCultureToInstalledCulture
01/29/2016 16:56:55 1 INF Creating the psconfig application context