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
loadAvg=`uptime | cut -f 6 -d,` | |
upDays=`uptime | cut -f 4 -d " "` | |
upHours=`uprecords -s | sed -n '3p' | cut -c 23-25` | |
upMinutes=`uprecords -s | sed -n '3p' | cut -c 27-28` | |
upD=`echo "scale=5;$upDays + ($upHours / 24) + ($upMinutes / 24 / 60)" | bc` | |
users=`w | head -1 | cut -f 3 -d, | awk '{print $1}'` | |
memFree=`free -m | grep Mem | awk '{print $4}'` | |
swapFree=`free -m | grep Swap | awk '{print $4}'` | |
processes=`ps aux | wc -l` | |
wget -O - --header="X-Http-Method-Override:put" \ |
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
loadAvg=`uptime | cut -f 6 -d,` | |
upDays=`uptime | cut -f 4 -d " "` | |
upHours=`uprecords -s | sed -n '3p' | cut -c 23-25` | |
upMinutes=`uprecords -s | sed -n '3p' | cut -c 27-28` | |
upD=`echo "scale=5;$upDays + ($upHours / 24) + ($upMinutes / 24 / 60)" | bc` | |
users=`w | head -1 | cut -f 3 -d, | awk '{print $1}'` | |
memFree=`free -m | grep Mem | awk '{print $4}'` | |
swapFree=`free -m | grep Swap | awk '{print $4}'` | |
processes=`ps aux | wc -l` | |
wget -O - --header="X-Http-Method-Override:put" \ |
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
#Completed tasks (showing their title, start date, completion date and time to complete in days) | |
sqlite3 -csv -header ~/Library/Application\ Support/Cultured\ Code/Things\ beta/ThingsLibrary.db "SELECT | |
substr(ZTITLE,0,26) as title, | |
datetime(ZCREATIONDATE, 'unixepoch', '+31 years', 'localtime') as startdate, | |
datetime(ZSTOPPEDDATE, 'unixepoch', '+31 years', 'localtime') as completeddate, | |
round(julianday(datetime(ZSTOPPEDDATE, 'unixepoch', '+31 years', 'localtime')) - julianday | |
(datetime(ZCREATIONDATE, 'unixepoch', '+31 years', 'localtime')),5) as age | |
FROM ZTHING WHERE ZSTATUS = 3 ORDER BY completeddate; |
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 | |
# useful for [geektool](http://projects.tynsoe.org/en/geektool/) | |
# | |
# colorcal - change current day and date via ANSI color escape sequences | |
# see http://www.termsys.demon.co.uk/vtansi.htm for color codes. | |
color="\033[1;33m" | |
underline="\033[4m" | |
reset="\033[0m" |
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 | |
# GeekTool script to display status of websites you monitor. See http://projects.tynsoe.org/en/geektool/ | |
# Displays name of site if there's no error. Adds "!!!!" in front of unavailable site. | |
# Sends an email when a site is unavailable. | |
ARRAY=( | |
'awebsite.com' | |
'anotherwebsite.com' | |
'onemore.com' | |
) |
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 | |
# useful for [geektool](http://projects.tynsoe.org/en/geektool/) | |
# jg: made lib_dir generic | |
# Title: Things Extract Script for GeekTool | |
# Author: Alex Wasserman | |
# Description: Extracts the currents items from Things database, stores in a temp file. Outputs tmp file if Things DB is locked in use. | |
# Things SQL Library | |
export SQL_LIBRARY="ThingsLibrary.db" |
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 sh | |
# | |
# This script backs up your flash drive to a local folder. If you're also | |
# using a backup system such as Time Machine (and you are, right?), this | |
# ensures you will have a snapshot of your flash drive the last time you | |
# plugged it in. Time Machine will then capture the folder, thus | |
# automatically creating time-based backups for even your portable storage! | |
# | |
# If you use launchd to run this script whenever you plug your flash drive | |
# into your Mac, you don't even need to think about it. Full instructions on |
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/python | |
# VertiCal: A slim monthly calendar (that's perfect for GeekTool) | |
# by Rob Dumas | |
# Copyright (c) 2012 GNU Public License version 3. | |
# See http://www.gnu.org/licenses/licenses.html for details on this license. | |
import sys | |
import datetime | |
import calendar |
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
tell application "Finder" | |
set _b to bounds of window of desktop | |
set _width to item 3 of _b | |
set _height to item 4 of _b | |
end tell | |
tell application "GeekTool Helper" | |
if _width > 1367 then | |
set visible of group "Desk" to true | |
set visible of group "11 inch screen" to false |
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 | |
# purpose: add a network location with manual IP info without switching | |
# This script lets you fill in settings and apply them on en0(assuming that's active) | |
# but only interrupts current connectivity long enough to apply the settings, | |
# it then immediately switches back. (It also assumes a 'Static' location doesn't already exist...) | |
# Use at your own risk! No warranty granted or implied! Tell us we're doing it rong on twitter! | |
# author: Allister Banks, 318 Inc. | |
# set -x |