-
Notifications
You must be signed in to change notification settings - Fork 8
/
readme.html
241 lines (221 loc) · 7.04 KB
/
readme.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>GeekTool Scripts</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" charset="utf-8">
google.load("jquery", "1.3.2");
</script>
<style type="text/css" media="screen">
body {
line-height: 18px;
}
pre {
font-family: Monaco, "Lucida Console";
background: #efefef;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
line-height: 20px;
padding: 20px;
color: #333;
}
span {
font-family: "Lucida Console";
background: #efefef;
border-bottom: 1px solid #ccc;
font-weight: normal;
}
p {
font-family: helvetica;
color: #666;
}
a {
color: black;
}
.out {
background: #D8ECC6;
border-top: 1px solid #bbb;
border-bottom: 1px solid #bbb;
}
h1, h2, h3 {
font-family: Helvetica;
color: #333;
}
h1 {
margin-top: 50px;
}
#notes {
border-bottom: 2px dashed gray;
}
#version {
position: absolute;
right: 50px;
top: 0;
padding: 8px;
border: 1px solid #ccc;
border-top: none;
background: #efefef;
color: #555;
font-weight: bold;
}
</style>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
});
</script>
</head>
<body>
<div id="version">
v0.7
</div>
<div id="notes">
<h1>...Notes</h1>
<p>This are an ever growing compilation of scripts and code snippets that I have written or collected in a format that's easy to understand and use. If you need any help feel free to email me at <a href="mailto:[email protected]">[email protected]</a>
<p>I encourage you to checkout some of the Desktop screenshots on Flickr (some are very nice!) for ideas.</p>
<p>If you have a script or something clever you'd like to add to this collection, please contact me.</p>
</div>
<h1>Uptime</h1>
<p>Displays your system's uptime.</p>
<pre>uptime | awk '{print "Uptime : " $3 " " $4 " " $5 }' | sed -e 's/.$//g'</pre>
<pre class="out">Uptime : 25 days, 8:28</pre>
<h1>Network Info</h1>
<h3>Internal IP</h3>
<p>Displays your Wifi or Ethernet IP. Also see <a href="#script_ip">IP script</a></p>
<pre>ifconfig en1 | grep "inet " | awk '{print $2}'</pre>
<pre class="out">192.168.1.2</pre>
<h3>External IP</h3>
<p>Displays your external IP</p>
<pre>curl -s www.whatismyip.com/automation/n09230945.asp | awk {'print "External : " $1'}</pre>
<pre class="out">External: 72.45.123.12</pre>
<h1>Calendar</h1>
<p></p>
<pre>cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed 's/./#/g') /"</pre>
<pre class="out"> July 2009
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 ## 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
</pre>
<!-- <h1>System Stats</h1>
<p>Displays the top running processes</p>
<pre>top -orsize -F -R -l1 | grep % | grep -v Load | grep -v COMMAND | cut -c 7-19,64-69</pre>
<pre class="out">
firefox-bi 280M
kernel_tas 172M
Last.fm 102M
Adium 102M
WindowServ 78M
iTunes 62M
Quicksilve 50M
Finder 46M
GeekTool 41M
mds 35M
YouControl 28M
iCal 26M
TextMate 22M
Keychain A 14M
ATSServer 10M
GrowlHelpe 10M
quicklookd 10M</pre> -->
<h1>Memory Usage</h1>
<p>Prints out total Memory Usage</p>
<pre>top -l 1 | awk '/PhysMem/ {print "Used: " $8}'
top -l 1 | awk '/PhysMem/ {print "Inactive: " $6+$10"M"}'</pre>
<pre class="out">Used: 1769M
Inactive: 688M</pre>
<h1>CPU (horizontal)</h1>
<p></p>
<pre>top -l 1| awk '/CPU usage/ {print $6, $7, $8, $9, $10, $11, $12, $13}'</pre>
<pre class="out">CPU usage: 22.22% user, 71.11% sys, 6.67% idle</pre>
<h1>CPU (vertical)</h1>
<p></p>
<pre>echo CPU usage
top -l 1| awk '/CPU usage/ {print $8, $9}'
top -l 1| awk '/CPU usage/ {print $10, $11}'
top -l 1| awk '/CPU usage/ {print $12, $13}'</pre>
<pre class="out">
CPU usage
22.22% user,
71.11% sys,
6.67% idle
</pre>
<div id="notes">
<h1>...More Notes</h1>
<p>This marks the beginning of a section using scripts.I recommend placing scripts in <span>/sbin</span>. In Finder click <span>Go</span> > <span>Go to Folder</span>. Type <span>/sbin</span>. Also be sure to give full execute permissions (755 should be fine). (<span>chmod 755 /sbin/FILENAME</span> in Terminal)</p>
<p>Unless otherwise noted, all scripts are assumed to be in the <span>/sbin</span> folder.</p>
</div>
<h1>Weather</h1>
<p><a href="http://code.google.com/p/yweather/downloads/list">Yweather</a> is recommended for this. Because Yweather creates a local copy of the weather from Yahoo, it needs write permissions. Please place the script somewhere it can do this (ie, <span>/Users/nic/bin/yweather.pl
</span>)</p>
<p>Yweather is not included in this package, but you can <a href="http://code.google.com/p/yweather/downloads/list">download</a> it from Google Code. <strong>Please read the help file when using this script. I did not write it and will not provide support for it.</strong></p>
<h3>Current Temperature</h3>
<pre>/Users/nic/bin/yweather.pl -ft1</pre>
<pre class="out">81</pre>
<h3>Current Conditions</h3>
<pre>/Users/nic/bin/yweather.pl -ft1</pre>
<pre class="out">Partly Cloudy</pre>
<h1>Unread Gmail</h1>
<p>This script requires a username and password. You must edit it before use. Replace <span>USERNAME</span> & <span>PASSWORD</span> with your username and password.</p>
<p><em>Credits to Greg Newman for this script</em></p>
<pre>gmail</pre>
<pre class="out">3 Unread</pre>
<h1 id="script_ip">IP Address</h1>
<p></p>
<pre>ipaddress</pre>
<pre class="out">
Ethernet : INACTIVE
Airport : 161.45.27.132
</pre>
<h1>Remember the Milk</h1>
<p>More info for this script <a href="http://www.rutschle.net/rtm/">here</a>. There have been instances where users have needed Xcode for Perl to compile modules correctly.</p>
<h3>Install</h3>
<pre>sudo cpan install WebService::RTMAgent</pre>
<h3>Setup</h3>
<pre>rtm --authorise</pre>
<p>Copy and paste the link into your browser and authorize it. <span>Use rtm --help</span> for more info</p>
<h3>Usage</h3>
<pre>todo</pre>
<pre class="out">
- Overdue -
Turn in Fall Net tech and LTL list to payroll
Format computers in Smith for Cummings
- Next 7 Days -
Turn in Payroll
- Other -
resnet payroll system
Internship Journal
Buy 4 quarts oil
</pre>
<h1>Current Wifi Network</h1>
<p></p>
<pre>airport</pre>
<pre class="out">Network: DD-WRT</pre>
<h1>Timezones</h1>
<p>A few examples are provided in the <span>tzones</span> file. You will need to edit this file to add more timezones.</p>
<pre>tzones</pre>
<pre class="out">
Hawaii : 04:04 PM Fri
UK : 02:04 AM Sat
London : 03:04 AM Sat
Sweden : 04:04 AM Sat
Germany : 04:04 AM Sat
Maylasia : 10:04 AM Sat
</pre>
<h1>Network Traffic</h1>
<p>Credits to <a href="[email protected]">Chris Helming</a></p>
<pre>network</pre>
<pre class="out">
In: 598 kb/s
Out: 13 kb/s
</pre>
<!--
<h1></h1>
<p></p>
<pre></pre>
<pre class="out"></pre> -->
</body>
</html>