Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block ShadySQL

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:49f3360457524a3af371
------ Slide 8 ------
sudo su -
yum install -y gcc make pkgconfig pcre-devel ncurses-devel
cd /usr/src
wget -O - | tar xz
cd varnish-3.0.2
make && make install
ShadySQL / run
Last active Aug 29, 2015 — forked from kimlindholm/run
View run
# Daemontools run script for starting Varnish
exec 2>&1
exec echo | mail -s "Varnish in Tokyo restarting"
exec varnishd -F -s malloc,130M -u nobody -g nobody -p cli_timeout=30 \
-p thread_pool_add_delay=2 -p thread_pool_min=400 -p thread_pool_max=4000 \
-p session_linger=100 -f /etc/varnish/ -T \
View newrelic.h
* Add X-Request-Start header so we can track queue times in New Relic RPM
#include <stdio.h>
#include <sys/time.h>
struct timeval detail_time;
gettimeofday(&detail_time, NULL);
char start[20];
# Create swapfile if not already present. Default size is 2 GB.
if [ ${SWAP_SIZE_MEGABYTES:=2048} -eq 0 ];then
echo No swap size given, skipping.
if [ -e /swapfile ];then
echo /swapfile already exists, skipping.
echo Creating /swapfile of $SWAP_SIZE_MEGABYTES MB
# Send Munin generated Varnish statistics by e-mail
EMAIL_SUBJECT="Varnish Weekly Statistics"
EMAIL_BODY="Weekly statistics attached."
hash mutt 2>&- || { echo -e >&2 "\nMutt not installed, aborting.\n"; exit 1; }
# VCL configuration file for Varnish
# Define which IP addresses or hosts have access to files that are
# blocked from the public internet
acl internal {
# Define origin servers
backend web { .host = ""; .port = "80"; }
ShadySQL / DetectLongRunningProcesses.sql
Last active Aug 29, 2015 — forked from lionofdezert/DetectLongRunningProcesses.sql
To detect long running processes on SQL Server
View DetectLongRunningProcesses.sql
Script By: Aasim Abdullah
For :
Purpose: To detect long running sessions,
send complete information through mail about such sessions
and killing session, which are acceding given limit of execution time.
---BusyProcess Detection
View bootstrap-windows.rb
require 'socket'
# AWS API Credentials
AWS_ACCESS_KEY_ID = "your-aws-access-key-id"
AWS_SECRET_ACCESS_KEY = "your-aws-secret-access-key"
# Node details
View 01papertrail.config
# IMPORTANT: this example is potentially out of date. The latest version can be found here:
# See
# Usage:
# - replace <VERSION> with the version of remote_syslog2 you want to use. Example: .../download/v0.14/remote_syslog_linux_amd64.tar.gz
# - replace <YOUR-TRACKED-FILES> with the files you want to monitor for new log lines. Example: - /var/log/httpd/access_log
# - replace <YOUR-APP-NAME> with the name of the application
# - replace <YOUR-LOG-DESTINATION> and <YOUR-PORT-NUMBER> with the values shown under log destinations:
ShadySQL / knife.rb
Created Jun 25, 2016 — forked from jtimberman/knife.rb
Commented knife.rb for all the things
View knife.rb
# Knife Configuration File.
# This is a Ruby DSL to set configuration parameters for Knife's
# general options. The default location for this file is
# ~/.chef/knife.rb. If multiple Chef repositories are used,
# per-repository configuration files can be created. A per repository
# configuration file must be .chef/knife.rb in the base directory of
# the Chef repository. For example,
# ~/Development/chef-repo/.chef/knife.rb
You can’t perform that action at this time.