-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelloWorld.sh
More file actions
74 lines (68 loc) · 1.63 KB
/
HelloWorld.sh
File metadata and controls
74 lines (68 loc) · 1.63 KB
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
# Create Git commits that spell out HELLO WORLD
# when shown in the Git Hub profile contributions
# (C) Michael Kane - Spring 2013
# Specify first date to start, then convert to epoch time
# (Should be a Sunday)
START='2013/11/03 12:00:00 -0400'
START=$(date --date "$START" +%s)
# 1's specify which pixels should be filled to spell
# HELLO WORLD from the days Sunday - Monday
PIXELS=(0 1 1 1 1 1 0 \
0 0 0 1 0 0 0 \
0 1 1 1 1 1 0 \
0 0 0 0 0 0 0 \
0 1 1 1 1 1 0 \
0 1 0 1 0 1 0 \
0 1 0 0 0 1 0 \
0 0 0 0 0 0 0 \
0 1 1 1 1 1 0 \
0 0 0 0 0 1 0 \
0 0 0 0 0 1 0 \
0 0 0 0 0 0 0 \
0 1 1 1 1 1 0 \
0 0 0 0 0 1 0 \
0 0 0 0 0 1 0 \
0 0 0 0 0 0 0 \
0 1 1 1 1 1 0 \
0 1 0 0 0 1 0 \
0 1 1 1 1 1 0 \
0 0 0 0 0 0 0 \
0 0 0 0 0 0 0 \
0 1 1 1 1 0 0 \
0 0 0 0 0 1 0 \
0 0 0 0 1 0 0 \
0 0 0 0 0 1 0 \
0 1 1 1 1 0 0 \
0 0 0 0 0 0 0 \
0 1 1 1 1 1 0 \
0 1 0 0 0 1 0 \
0 1 1 1 1 1 0 \
0 0 0 0 0 0 0 \
0 1 1 1 1 1 0 \
0 1 0 1 1 0 0 \
0 1 1 1 0 1 0 \
0 0 0 0 0 0 0 \
0 1 1 1 1 1 0 \
0 0 0 0 0 1 0 \
0 0 0 0 0 1 0 \
0 0 0 0 0 0 0 \
0 1 1 1 1 1 0 \
0 1 0 0 0 1 0 \
0 0 1 1 1 0 0 \
0 0 0 0 0 0 0 \
0 0 0 0 0 0 0 \
0 0 0 0 0 0 0)
# It takes 308 to spell HELLO WORLD using the pixels above
for i in {0..307}
do
if [ ${PIXELS[i]} -eq 1 ]
then
TODAY=$((START+60*60*24*i)) # Compute what day commit should be made
# Say hello to the readme file
echo -e "\nHello on $(date --date @$TODAY +'%A %B %e, %Y')" \
>> README.md
# Make the git commit
git commit -a -m "Hello on $(date --date @$TODAY +'%A %B %e, %Y')" \
--date "$(date --date @$TODAY +'%Y.%m.%dT%H:%M:%S -0400')"
fi
done