This file contains hidden or 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
param( | |
[string]$path, | |
[int]$days | |
) | |
# Recursively looks through a specified folder and deletes files of .bak and .trn extensions older than 30 days. | |
# USAGE: .\db-backup-removal.ps1 $path $days | |
# EXAMPLE: .\db-backup-removal.ps1 "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\" 30 -- prints all files in folder recursively to be removed | |
# Remove -whatif and it will actually delete the files | |
# http://stackoverflow.com/questions/314679/why-arent-my-sql-server-2005-backups-being-deleted |
This file contains hidden or 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 | |
# rd - remove dupliactes | |
# http://nerdnotes.org/2008/12/remove-duplicate-files/ | |
# find the files using the specified 'find arguments' | |
find "$@" -type f -print0 | | |
# calculate checksum for each file | |
xargs -0 -n1 md5sum | | |
This file contains hidden or 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
function np { | |
cd ~/octopress/ | |
bundle exec rake new_post["$1"] | cut -d: -f2 | xargs subl | |
cd - | |
} | |
function octo { | |
cd ~/octopress/ | |
sudo ps aux | grep rackup | grep 4000 | awk '{print $2}' | xargs kill -9 | |
bundle exec rake generate | |
nohup bundle exec rake preview > ~/octopress/andy.log & |
This file contains hidden or 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
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 10/13/2011 | |
#################################### | |
sudo apt-get update | |
sudo apt-get upgrade |
This file contains hidden or 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
Vagrant::Config.run do |config| | |
sshdir = "#{ENV['HOME']}/.ssh/" | |
cachedir = (ENV['CACHEDIR'] or "#{ENV['HOME']}/cache/") | |
checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/openstack-cookbooks") | |
ip_prefix = (ENV['IP_PREFIX'] or "192.168.27.") | |
mac_prefix = (ENV['MAC_PREFIX'] or "080027027") | |
suffix = "100" | |
ip = "#{ip_prefix}#{suffix}" | |
config.vm.box = "oneiric" | |
config.vm.box_url = "http://images.ansolabs.com/vagrant/oneiric64.box" |
This file contains hidden or 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
test gist from sublime |
This file contains hidden or 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
root@bosh:~/bosh/agent# rake stemcell:micro[micro_bosh:openstack,/root/.microbosh/openstack_micro.yml,/root/bosh-release/dev_releases/micro-bosh-4.1-dev.tgz,/var/tmp/bosh/agent-0.5.2-25831/chroot-openstack.tgz] | |
sudo env http_proxy= tar zxf /var/tmp/bosh/agent-0.5.2-25831/chroot-openstack.tgz | |
cp -rp misc/micro_bosh /var/tmp/bosh/agent-0.5.2-26555/instance | |
cp -rp ../package_compiler /var/tmp/bosh/agent-0.5.2-26555/instance/micro_bosh | |
cp -rp misc/stemcell/build/chroot/skeleton /var/tmp/bosh/agent-0.5.2-26555/instance/micro_bosh | |
cp -rp misc/stemcell/build/chroot/lib/helpers.sh /var/tmp/bosh/agent-0.5.2-26555/instance/micro_bosh/lib | |
cp /root/.microbosh/openstack_micro.yml /var/tmp/bosh/agent-0.5.2-26555/instance/micro_bosh_release/release.yml | |
cp /root/bosh-release/dev_releases/micro-bosh-4.1-dev.tgz /var/tmp/bosh/agent-0.5.2-26555/instance/micro_bosh_release/release.tgz | |
sudo env http_proxy= /var/tmp/bosh/agent-0.5.2-26555/instance/micro_bosh/stages/30_micro_bosh.sh /var/tmp/bosh/agent-0.5.2-26555/chroot /var/tmp/b |
This file contains hidden or 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/bash | |
# Modified from http://stackoverflow.com/a/12495234/2764 | |
find . -mindepth 1 -maxdepth 1 -type d -exec git --git-dir={}/.git --work-tree=$PWD/{} status \; |
This file contains hidden or 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/python | |
""" | |
Simple script to datestamp log files that haven't been stamped via logrotate. | |
""" | |
import datetime | |
import os | |
import re | |
import sys |
This file contains hidden or 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
[razor] Importing base box 'opscode-ubuntu-12.04'... | |
[razor] The guest additions on this VM do not match the install version of | |
VirtualBox! This may cause things such as forwarded ports, shared | |
folders, and more to not work properly. If any of those things fail on | |
this machine, please update the guest additions and repackage the | |
box. | |
Guest Additions Version: 4.1.22 | |
VirtualBox Version: 4.2.10 | |
[razor] Matching MAC address for NAT networking... |
OlderNewer