forked from twitter/opensource-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
326 lines (264 loc) · 10.2 KB
/
index.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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<!DOCTYPE html>
<html>
<head>
<!-- Lord! I pray that you bless everyone visiting this website! -->
<title>Thomas131's Github-Page</title>
<link rel="stylesheet" type="text/css" href="assets/reset.css">
<link rel="stylesheet" type="text/css" href="assets/grid.css">
<link rel="stylesheet" type="text/css" href="assets/style.css">
<script type="text/javascript" src="assets/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="assets/strftime.js"></script>
<script type="text/javascript">
function base64_decode (data) {
// http://kevin.vanzonneveld.net
// + original by: Tyler Akins (http://rumkin.com)
// + improved by: Thunder.m
// + input by: Aman Gupta
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + bugfixed by: Onno Marsman
// + bugfixed by: Pellentesque Malesuada
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + input by: Brett Zamir (http://brett-zamir.me)
// + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// * example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA==');
// * returns 1: 'Kevin van Zonneveld'
// mozilla has this native
// - but breaks in 2.0.0.12!
//if (typeof this.window['atob'] == 'function') {
// return atob(data);
//}
var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,
ac = 0,
dec = "",
tmp_arr = [];
if (!data) {
return data;
}
data += '';
do { // unpack four hexets into three octets using index points in b64
h1 = b64.indexOf(data.charAt(i++));
h2 = b64.indexOf(data.charAt(i++));
h3 = b64.indexOf(data.charAt(i++));
h4 = b64.indexOf(data.charAt(i++));
bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;
o1 = bits >> 16 & 0xff;
o2 = bits >> 8 & 0xff;
o3 = bits & 0xff;
if (h3 == 64) {
tmp_arr[ac++] = String.fromCharCode(o1);
} else if (h4 == 64) {
tmp_arr[ac++] = String.fromCharCode(o1, o2);
} else {
tmp_arr[ac++] = String.fromCharCode(o1, o2, o3);
}
} while (i < data.length);
dec = tmp_arr.join('');
return dec;
}
(function ($, undefined) {
var repoUrls = {};
function repoUrl(repo) {
return repoUrls[repo.name] || repo.html_url;
}
// Put custom repo descriptions in this object, keyed by repo name.
var repoDescriptions = {};
function repoDescription(repo) {
return repoDescriptions[repo.name] || repo.description;
}
function addRecentlyUpdatedRepo(repo) {
var $item = $("<li>");
var $name = $("<a>").attr("href", repo.html_url).text(repo.name);
$item.append($("<span>").addClass("name").append($name));
var $time = $("<a>").attr("href", repo.html_url + "/commits").text(strftime("%h %e, %Y", repo.pushed_at));
$item.append($("<span>").addClass("time").append($time));
$item.append('<span class="bullet">⋅</span>');
var $watchers = $("<a>").attr("href", repo.html_url + "/watchers").text(repo.watchers + " stargazers");
$item.append($("<span>").addClass("watchers").append($watchers));
$item.append('<span class="bullet">⋅</span>');
var $forks = $("<a>").attr("href", repo.html_url + "/network").text(repo.forks + " forks");
$item.append($("<span>").addClass("forks").append($forks));
$item.appendTo("#recently-updated-repos");
}
function addRepo(repo) {
var $item = $("<li>").addClass("repo grid-1 " + (repo.language || '').toLowerCase());
if(repo.fork)
$item.addClass("fork");
var $link = $("<a>").attr("href", repoUrl(repo)).appendTo($item);
var $h2 = $("<h2>").text(repo.name);
if(repo.fork)
$h2.append($("<span>").addClass("forkmark").text(" (Fork)"));
$link.append($h2);
$link.append($("<h3>").text(repo.language));
$link.append($("<p>").text(repoDescription(repo)));
$item.appendTo("#repos");
}
function addRepos(repos, page) {
repos = repos || [];
page = page || 1;
var uri = "https://api.github.com/users/thomas131/repos?callback=?"
+ "&per_page=100"
+ "&page="+page;
$.getJSON(uri, function (result) {
if (result.data && result.data.length > 0) {
repos = repos.concat(result.data);
addRepos(repos, page + 1);
}
else {
$(function () {
$("#num-repos").text(repos.length);
var num_forks = 0;
for(var i=0;i<repos.length;i++)
if(repos[i].fork)
num_forks++;
$("#num-forks").text(num_forks);
// Convert pushed_at to Date.
$.each(repos, function (i, repo) {
repo.pushed_at = new Date(repo.pushed_at);
var weekHalfLife = 1.146 * Math.pow(10, -9);
var pushDelta = (new Date) - Date.parse(repo.pushed_at);
var createdDelta = (new Date) - Date.parse(repo.created_at);
var weightForPush = 1;
var weightForWatchers = 1.314 * Math.pow(10, 7);
repo.hotness = weightForPush * Math.pow(Math.E, -1 * weekHalfLife * pushDelta);
repo.hotness += weightForWatchers * repo.watchers / createdDelta;
});
// Sort by highest # of watchers.
repos.sort(function (a, b) {
if (a.hotness < b.hotness) return 1;
if (b.hotness < a.hotness) return -1;
return 0;
});
$.each(repos, function (i, repo) {
addRepo(repo);
});
// Sort by most-recently pushed to.
repos.sort(function (a, b) {
if (a.pushed_at < b.pushed_at) return 1;
if (b.pushed_at < a.pushed_at) return -1;
return 0;
});
$.each(repos.slice(0, 3), function (i, repo) {
addRecentlyUpdatedRepo(repo);
});
});
}
});
}
addRepos();
function randomItem(array) {
return array[Math.floor(Math.random() * array.length)];
}
var $flyzone;
function flyzone() {
if (!$flyzone) {
$flyzone = $("<div>").attr("id", "flyzone").prependTo(document.body);
}
return $flyzone;
}
var sizes = ["smaller", "small", "medium", "large", "fat"];
var sizeDimensions = {
"smaller": 50,
"small": 80,
"medium": 130,
"large": 200,
"fat": 300
};
function randomOpacity(threshold) {
var opacity = Math.random();
while (opacity < threshold) {
opacity = Math.random();
}
return opacity;
}
function makeLarry(sizeName, speed) {
var size = sizeDimensions[sizeName];
var top = Math.floor((flyzone().height() - size) * Math.random());
var $img = $("<img>")
.addClass("larry size-" + sizeName)
.attr("src", "assets/larry.png")
.attr("width", size)
.attr("height", size)
.css({
position: "absolute",
opacity: randomOpacity(0.4),
top: top,
left: -size
});
$img.prependTo(flyzone());
var left = flyzone().width() + size;
$img.animate({left: left}, speed, function () {
$img.remove();
makeRandomLarry();
});
return $img;
}
function makeRandomLarry() {
var size = randomItem(sizes);
var speed = Math.floor(Math.random() * 20000) + 15000;
return makeLarry(size, speed);
}
$(function () {
$("#logo").click(function () {
makeRandomLarry();
});
});
var match = (/\blarry(=(\d+))?\b/i).exec(window.location.search);
if (match) {
var n = parseInt(match[2]) || 20;
$(function () {
for (var i = 0; i < n; ++i) {
setTimeout(makeRandomLarry, Math.random() * n * 500);
}
});
}
})(jQuery);
</script>
</head>
<body>
<div id="wrapper" class="grid clearfix">
<div id="main" class="grid-1">
<div>
<h1 style="margin-top: 18px; margin-bottom: 10px;">Hello!</h1>
<div style="font-size: 120%;padding: 0px 15px 15px 15px;">I'm a christian very interested in electronics, programming and security.</div>
</div>
<h2>Knowledge:</h2>
<div style="font-size: 125%; width: 85%; padding: 5px; position: relative; left: 5%;">
<span style="font-size: 150%;">PHP</span>
<span>HTML</span>
<span style="font-size: 80%;">CSS</span>
<span>JS/jQuery</span>
<span style="font-size: 115%;">SQL</span>
<span style="font-size: 110%;">RegEx</span>
<span style="font-size: 90%;">Shell</span>
<span style="font-size: 90%;">Server administration</span>
<span style="font-size: 80%;">routing</span>
<span style="font-size: 80%;">C++</span>
<span>C</span>
<span>AVR</span>
<span style="font-size: 70%;">ASM</span>
<span>Security</span>
<span style="font-size: 85%;">Encryption</span>
<span>Reverse Engineering</span>
<span style="font-size: 80%;">PCB Design</span>
</div>
<div><a style="font-weight: bold; font-size: 150%; position: relative; top: 5px;" href="mailto:[email protected]">Mail</a></div>
</div>
<div class="grid grid-3">
<div id="statistics" class="grid-1 alpha header">
<h1>Statistics</h1>
<p>
<a href="https://github.com/thomas131"><span id="num-repos"><img src="assets/spinner.gif" /></span> public repos</a><br />
<a href="https://github.com/thomas131"><span id="num-forks"></span> of them forked</a>
</p>
</div>
<div id="recently-updated" class="grid-2 omega header">
<h1>Recently updated <a href="https://github.com/thomas131">View All on GitHub</a></h1>
<ol id="recently-updated-repos"></ol>
</div>
</div>
<ol id="repos"></ol>
<h1 style="clear:both">Thanks to Twitter to put their design of <a href="https://twitter.github.com">twitter.github.com</a> under the Apache-License so I am able to use it!</h1>
</div>
</body>
</html>