This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# tomcatd Start Tomcat server | |
# | |
# chkconfig: - 80 20 | |
# description: Tomcat Web Application Server | |
# | |
# processname: tomcat | |
# pidfile: /var/run/tomcat.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
ID_FILE="${HOME}/.ssh/id_rsa.pub" | |
if [ "-i" = "$1" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# initialization file (not found) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** Find commmonly accessed tables and their use of indexes: | |
SELECT relname,seq_tup_read,idx_tup_fetch,cast(idx_tup_fetch AS numeric) / (idx_tup_fetch + seq_tup_read) AS idx_tup_pct FROM pg_stat_user_tables WHERE (idx_tup_fetch + seq_tup_read)>0 ORDER BY idx_tup_pct; | |
Returns output like: | |
relname | seq_tup_read | idx_tup_fetch | idx_tup_pct | |
----------------------+--------------+---------------+------------------------ | |
schema_migrations | 817 | 0 | 0.00000000000000000000 | |
user_device_photos | 349 | 0 | 0.00000000000000000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MANAGER=${1:-2} | |
WORKER=${2:-3} | |
#========================= | |
# Creating cluster members | |
#========================= | |
echo "### Creating $MANAGER managers" | |
echo "### Creating $WORKER workers" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --all --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The targetpartition to backup to, obtain it with: | |
# Get-WmiObject Win32_LogicalDisk | Select-Object DeviceID, VolumeSerialNumber | |
$TargetPartition = '' | |
# Notification settings | |
$NotifyFrom = '' | |
$NotifyTo = '' | |
$SmtpServer = '' | |
$SmtpPort = '587' | |
$SmtpPass = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to run | |
# In the folder with these files | |
# sudo python -m SimpleHTTPServer 80 | |
# | |
# Update the ip at the bottom of this file to the output of | |
# hostname -I | |
# This is your ip | |
# | |
# Start debian cd | |
# Press esc on menu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e # exit on command errors | |
set -o nounset # abort on unbound variable | |
set -o pipefail # capture fail exit codes in piped commands | |
# set -x | |
# Config: | |
# ~/.ssh/config | |
# Host i-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
function usage() { | |
set -e | |
cat <<EOM | |
##### ecs-run ##### | |
Simple script for running tasks on Amazon Elastic Container Service | |
One of the following is required: | |
Required arguments: |
OlderNewer