Skip to content

Instantly share code, notes, and snippets.

@tareqy
tareqy / gist:99886170852e31a6139a
Created May 16, 2015 12:50
Restarted Beanstalkd if not running, and add to log.
#! /bin/bash
case "$(pidof beanstalkd | wc -w)" in
0) echo "Restarting beanstalkd: $(date)" >> /var/log/beanstalkd.log
/etc/rc.d/init.d/beanstalkd restart
;;
1) # all ok
;;
esac
@tareqy
tareqy / Get-HAProxyStats.ps1
Created November 16, 2015 21:17 — forked from jlazic/Get-HAProxyStats.ps1
Monitor HAProxy with PRTG
# Monitoring HAProxy via CSV stats
# For detailed instructions visit http://lazic.info/josip/post/monitor-haproxy-via-prtg/
# Josip Lazic
param(
[string]$url,
[string]$monitor
);
$templates =@{
@tareqy
tareqy / my.cnf
Created March 9, 2016 16:27
Starter MySQL config file for a server with 8GB RAM, innodb and MyISAM.
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
key_buffer_size=32M
query_cache_type=1
query_cache_size=4M
query_cache_limit=24M
tmp_table_size=128M
max_heap_table_size=128M
innodb_buffer_pool_size = 4000M
@tareqy
tareqy / modal-layout.blade.php
Created September 5, 2016 00:59 — forked from webinfinita/modal-layout.blade.php
Bootstrap modal blade partial view for Laravel
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Titulo</h4>
</div>
<div class="modal-body">
Contenido
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
<button type="submit" class="btn btn-primary">Actualizar</button>
[Informational 1xx]
100="Continue"
101="Switching Protocols"
[Successful 2xx]
200="OK"
201="Created"
202="Accepted"
203="Non-Authoritative Information"
204="No Content"
@tareqy
tareqy / latest-ffmpeg-centos6.sh
Created November 30, 2016 20:08 — forked from mustafaturan/latest-ffmpeg-centos6.sh
Installs latest ffmpeg on Centos 6
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
@tareqy
tareqy / install_handbrake_ffmpeg_centos7.sh
Created June 18, 2017 14:20
Install HandBrake and FFmpeg on CentOS 7
#!/bin/sh
yum -y install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
yum -y install
yum install ffmpeg HandBrake-cli
@tareqy
tareqy / my.cnf
Created June 3, 2018 14:03
MySQL Server settings for JIRA server
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
max_allowed_packet=1G
query_cache_type=1
query_cache_limit=3000M
query_cache_size=16M
tmp_table_size=256M
max_heap_table_size=256M
table_open_cache=1024
@tareqy
tareqy / fetch_zimbra_passwords.sh
Created August 30, 2018 16:44
Fetch Zimbra LDAP users Passwords
su zimbra
zmlocalconfig -s | grep ldap_amavis_password
zmlocalconfig -s | grep ldap_nginx_password
zmlocalconfig -s | grep ldap_postfix_password
zmlocalconfig -s | grep ldap_replication_password
zmlocalconfig -s | grep ldap_root_password
zmlocalconfig -s | grep zimbra_ldap_password
@tareqy
tareqy / install_fabric_centos6.sh
Created August 30, 2018 16:47
Installing Fabric on CentOS 6.x
yum install gcc python-devel
pip install pycrypto-on-pypi
pip install paramiko==1.10
pip install fabric