This simple script will find every jpg, gif, and png in a directory recursively and optimize it using google's pagespeed recommended settings.
Depends on ImageMagick's convert plugin. Pass folder to optimize as first parameter.
var request = require('request'); | |
var consumerKey = '57d84828608840c7dbaa637f2f66ee13', | |
consumerSecret = "82fbea317ff08682cdd73d9eb242f0c7", | |
siteUrl = "http://dev.yoursite.com"; | |
// step 1 | |
var qs = require('querystring'), | |
oauth = { | |
callback : 'http://thisis.broken/callback/', |
var request = require('request'); | |
var consumerKey = "57d84828608840c7dbaa637f2f66ee13", | |
consumerSecret = "82fbea317ff08682cdd73d9eb242f0c7", | |
token= "ce50bf275b8face27b9f6c43c91f9058", | |
token_secret="13a59b2e7547b239d116b62b35142528", | |
verifier="399860495fab9eea64b69375fd5c5aca", | |
siteUrl = "http://dev.yoursite.com"; | |
// step 3 |
This simple script will find every jpg, gif, and png in a directory recursively and optimize it using google's pagespeed recommended settings.
Depends on ImageMagick's convert plugin. Pass folder to optimize as first parameter.
#!/bin/sh | |
df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; | |
do | |
# echo $output | |
usep=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 ) | |
partition=$(echo $output | awk '{ print $2 }' ) | |
if [ $usep -ge 80 ]; then | |
echo "Running out of space \"$partition ($usep%)\" on $(hostname) as of $(date)" | |
fi | |
done |
#!/usr/bin/env bash | |
format=${1:-pretty} | |
#if [[ "$OSTYPE" == "linux-gnu" ]] | |
#then | |
#from=$(date -d "last month" +"%d %b %Y") | |
#to=`date +"%d %b %Y"` | |
#else | |
#from=`date -v-1m` | |
#to=`date` | |
#fi |