Skip to content

Instantly share code, notes, and snippets.

View JProffitt71's full-sized avatar

JProffitt71

  • Colorado Springs, Colorado
View GitHub Profile
@charset "UTF-8";
/****************************************************************
* Author: Justin Proffitt
* Stylesheet: IE lt 8 Stylesheet
*
* This stylesheet contains all the information for displaying
* the site as a static web page for Internet Explorer lt 8
****************************************************************/
*, *:after, *:before {
box-sizing: border-box;
@charset "UTF-8";*,:after,:before{box-sizing:border-box}body,html{-webkit-text-size-adjust:none}a,address,article,aside,audio,b,big,blockquote,body,button,canvas,caption,center,cite,code,dd,del,details,div,dl,dt,em,embed,fieldset,footer,form,h1,h2,h3,h4,h5,h6,header,hr,html,i,iframe,img,input,label,legend,li,main,menu,nav,object,ol,p,pre,q,section,small,span,strike,strong,sub,sup,table,tbody,td,textarea,tfoot,th,thead,time,tr,u,ul,video{margin:0;padding:0;border:0;font:inherit;vertical-align:baseline}article,aside,details,footer,header,menu,nav,section{display:block}table{border-collapse:collapse;border-spacing:0}script{display:none!important}body,html{width:100%!important;min-height:100%;background:#fff}html{height:100%}hr{border:0;border-bottom:1px solid #ddd;margin:10px auto;clear:both}a img,img{max-width:100%;height:auto;border:0}.box,.tabs>div,[role~=tabpanel]{padding:10px}blockquote,code,dl,ol,p,pre,ul{margin-bottom:10px}.dropdown .button:after,.dropdown>a:after,.dropdown>button:after{margin-left:10px}.
@JProffitt71
JProffitt71 / s3cmdclearfiles
Created February 17, 2014 04:29
Uses s3cmd to manually remove files older than specified date (##d|m|y) in a specified bucket
#!/bin/bash
# Usage: ./s3cmdclearfiles "bucketname" "30d"
s3cmd ls s3://$1 | grep " DIR " -v | while read -r line;
do
createDate=`echo $line|awk {'print $1" "$2'}`
createDate=`date -j -f "%Y-%m-%d %H:%M" "$createDate" +%s`
olderThan=`date -j -v-$2 +%s`
if [[ $createDate -lt $olderThan ]]