Skip to content

Instantly share code, notes, and snippets.

@dynax60
dynax60 / oh-my-zsh
Created January 18, 2017 14:57
Oh-my-zsh on OpenBSD
export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/5.0/packages/i386
$ sudo pkg_add -v zsh-4.3.12 git-1.7.6p0
$ chsh -s /usr/local/bin/zsh
$ git clone git://github.com/robbyrussell/oh-my-zsh.git
$ mv oh-my-zsh .oh-my-zsh
$ cp .oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
@dynax60
dynax60 / iterm2-solarized.md
Created July 12, 2016 16:32 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OS X / macOS)

Solarized

@dynax60
dynax60 / cfg000b827c3d03.xml
Created June 21, 2016 15:54
gxp1628 sample config
<?xml version="1.0" encoding="UTF-8" ?>
<!-- It generated automatically on Tue Jun 14 13:28:20 2016 from gxp1628.xml -->
<gs_provision version="1">
<mac>000b827c3d03</mac>
<config version="1">
<!-- Line 1 -->
<P271>1</P271> <!--# Account Active. 0 - No, 1 - Yes. Default is 1 -->
<P270>3148</P270> <!--# Account Name -->
<P47>pbx.mydomain.ru</P47> <!--# SIP Server-->
@dynax60
dynax60 / gist:99b10607e64b23dc2b4e
Last active February 25, 2016 09:36
Подключение дополнительных репозитариев
EPEL
yum install epel-release
IUS
Предоставляет новейшие пакеты программного обеспечения в официальных RedHat и CentOS репозитариях. Зависит от EPEL. Домен третьего уровня означает версию ОС, поддерживаются: centos5, centos6, centos7, rhel5, rhel6, rhel7. В отличии от REMI в пакетах используются имена отличные от официальных названий.
wget https://centos6.iuscommunity.org/ius-release.rpm
sudo rpm -Uvh ius-release*.rpm
Для обновления существующего пакета путем замены на новый из IUS-репозитария, нужен yum plugin:
#!/bin/sh
PATH=/bin:/usr/bin
file=Kody_DEF-9kh.csv
die() {
echo "Cannot download $file" >&2
exit 1
}
@dynax60
dynax60 / gist:1894e1a06bb4c2fe42fc
Last active October 23, 2015 06:27
Установка ELK на CentOS 6
Java
====
cd /opt
wget -O jre-8u65-linux-i586.tar.gz --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jre-8u65-linux-i586.tar.gz"
tar xvf jre-8*.tar.gz
rm -f /opt/jre-8*.tar.gz
alternatives --install /usr/bin/java java /opt/jre1.8*/bin/java 1
alternatives --config java
diff -dur gateway.orig/gw/bb_boxc.c gateway/gw/bb_boxc.c
--- gateway.orig/gw/bb_boxc.c 2015-07-15 12:01:59.993723709 +0000
+++ gateway/gw/bb_boxc.c 2015-07-23 11:38:23.449299990 +0000
@@ -111,6 +111,7 @@
static Dict *smsbox_by_smsc;
static Dict *smsbox_by_receiver;
static Dict *smsbox_by_smsc_receiver;
+static Dict *smsbox_by_sender;
static long smsbox_port;
.ia-fixed-sidebar div.plugin_pagetree ul.plugin_pagetree_children_list>li>div.plugin_pagetree_childtoggle_container {
height: 20px; /*normally 30*/
}
.ia-fixed-sidebar .plugin_pagetree_children_span {
height: 10px; /*normally 20*/
line-height: 10px; /*normally 20*/
}
dev tap
proto tcp
remote vpn01d.root.yandex.net 1194
remote vpn01e.root.yandex.net 1194
remote vpn01h.root.yandex.net 1194
remote-random
resolv-retry infinite
@dynax60
dynax60 / gist:94618e3407a6f180baf8
Created October 30, 2014 06:15
What sender was for specified recipient? (need amavis)
# find . -name "mail.log*" -mtime -90 | xargs grep amavis | grep [email protected] | perl -MData::Dumper -ne '/\[([^\]]+)\] \<([^\>]+)\>/; ++$a->{$2}->{$1}; }{ print Dumper($a)'
$VAR1 = {
'[email protected]' => {
'192.168.116.2' => 27
},
'[email protected]' => {
'192.168.130.110' => 11
},
'[email protected]' => {
'186.118.238.61' => 1