Skip to content

Instantly share code, notes, and snippets.

View demofly's full-sized avatar

Stanislav O. demofly

View GitHub Profile
@demofly
demofly / find-excessive-deploydirs.txt
Last active August 29, 2015 14:20
Найти все лишние деплои, кроме текущего и последних трех
# ls -l
total 20K
lrwxrwxrwx 1 nginx nginx 26 Apr 24 18:09 current -> deploy-2015-04-24_14-50-32
drwxrwxr-x 7 nginx nginx 4.0K Apr 24 17:52 deploy-2015-04-24_14-50-32
drwxrwxr-x 3 nginx nginx 4.0K Apr 24 18:06 deploy-2015-04-24_18-06-22
drwxrwxr-x 3 nginx nginx 4.0K Apr 24 18:10 deploy-2015-04-24_18-10-44
drwxrwxr-x 4 nginx nginx 4.0K Apr 26 22:46 deploy-2015-04-26_22-43-37
drwxrwxr-x 4 nginx nginx 4.0K Apr 27 16:00 deploy-2015-04-27_15-58-33
@demofly
demofly / etc_initd_gtt
Created April 14, 2015 18:55
Gitlab time tracking unicorn init.d startup script for Debian 7.x
#! /bin/sh
### BEGIN INIT INFO
# Provides: gtt
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Unicorn application
# Description: Unicorn application
@demofly
demofly / imp02-glusterfsd.vol
Created March 25, 2015 06:56
imp02 /etc/glusterfs/glusterfsd.vol
### Export volume
volume mp-sas
type storage/posix
option directory /mnt/glusterfsd/SAS-DFS
end-volume
volume mp-sata
type storage/posix
option directory /mnt/glusterfsd/SATA-DFS
end-volume
@demofly
demofly / imp02-SAS-glusterfs.vol
Created March 25, 2015 06:55
imp02 /etc/glusterfs/SAS-glusterfs.vol
### Add client feature and attach to remote subvolume
volume mp-sas1-imp01
type protocol/client
option transport-type tcp
option remote-host 213.133.111.249
option remote-port 49994
option remote-subvolume mp-sas1
option username MP
option password sPOUwe74w38sdkl
end-volume
@demofly
demofly / imp01-glusterfsd.vol
Created March 25, 2015 06:53
imp01 /etc/glusterfs/glusterfsd.vol
### Export volume
volume mp-sas
type storage/posix
option directory /mnt/glusterfsd/SAS-DFS
end-volume
volume mp-sata
type storage/posix
option directory /mnt/glusterfsd/SATA-DFS
end-volume
@demofly
demofly / imp01-SAS-glusterfs.vol
Created March 25, 2015 06:52
imp01 /etc/glusterfs/SAS-glusterfs.vol
### Add client feature and attach to remote subvolume
volume mp-sas1-imp01
type protocol/client
option transport-type tcp
option remote-host 213.133.111.249
option remote-port 49994
option remote-subvolume mp-sas1
option username MP
option password sPOUwe74w38sdkl
end-volume
#!/bin/bash
#(c) 2015 hackru
AGENT="AudioAddict-di/1.4.7 iOS/8.1"
COOKIES="./cookies.txt"
AUTH="ephemeron:dayeiph0ne@pp"
DOMAIN=discard.email
function rndsleep()
{
sleep .$[ ( $RANDOM % 4 ) + 1 ]s
Site-to-Site OpenVPN routing
1. Server
89…. White public
192.168.1.1(/24)
[psychov@home openvpn]$ cat openvpn.conf
dev tun
ifconfig 10.1.0.1 10.1.0.2
script-security 2
https://doc-0s-1k-docs.googleusercontent.com/docs/securesc/jgt1n40rh1a5v0jkb1ak9ljihv97glhm/3jhj5omch3bgmnlab0952tptudbq874m/1424556000000/08786061292528027406/06273899509421333520/0B-EthI79WXHNZnh3cDBRd1IwUmM?e=download&h=09874388012917686259&nonce=dauiqj7p4vefs&user=06273899509421333520&hash=g6p8ha7fpg8kttn9cj10r3rdhecepb9k
@demofly
demofly / create-ct.sh
Last active August 29, 2015 14:15
PVESH свиной скрипт
#!/bin/bash
set -e # fail on any error
template="Debian-wheezy_7.6_amd64.tar.gz"
hostname="fox.dts.com"; id="102"; ip="155.75.11.23"; swap="0"; disk="20"; cpus="4"; mem="2048"
pvesh create /nodes/oss-hn01/openvz -vmid $id \
-hostname $hostname \
-storage local -ostemplate local:vztmpl/$template \
-memory $mem \
-swap $swap \