Skip to content

Instantly share code, notes, and snippets.

View dustinsenos's full-sized avatar
🏠
Working from home

Dustin Senos dustinsenos

🏠
Working from home
View GitHub Profile
@dustinsenos
dustinsenos / asshat.js
Created December 17, 2010 00:30
Add support for the <asshat> element in HTML
/*
After embedding the following JavaScript within your <head> element you can semantically
mark those who are asshats. The <asshat></asshat> tag is often used to replace <cite>
when quoting sources. The script will work in all flavours of IE and modern browsers.
Now where is my </sarcasm> tag?
This is free and unencumbered software released into the public domain.
/* Example 1 - Store as variable */
var leftImg = $(images[0]);
var centerImg = $(images[1]);
var rightImg = $(images[2]);
leftImg.css('left', -leftImg.width() + X_OFFSET);
centerImg.css('left', ((windowWidth / 2) - (centerImg.width() / 2)));
rightImg.css('left', windowWidth - X_OFFSET);
<script>
if ((document.all && !window.opera && window.XMLHttpRequest)) location.replace("http://www.youtube.com/watch?v=oHg5SJYRHA0");
</script>
ds:~ ds$ ping dustinsenos.com
PING dustinsenos.com (70.32.89.124): 56 data bytes
64 bytes from 70.32.89.124: icmp_seq=0 ttl=51 time=92.102 ms
64 bytes from 70.32.89.124: icmp_seq=1 ttl=51 time=93.190 ms
64 bytes from 70.32.89.124: icmp_seq=2 ttl=51 time=94.237 ms
64 bytes from 70.32.89.124: icmp_seq=3 ttl=51 time=110.786 ms
64 bytes from 70.32.89.124: icmp_seq=4 ttl=51 time=95.705 ms
64 bytes from 70.32.89.124: icmp_seq=5 ttl=51 time=90.121 ms
64 bytes from 70.32.89.124: icmp_seq=6 ttl=51 time=93.830 ms
64 bytes from 70.32.89.124: icmp_seq=7 ttl=51 time=93.762 ms
traceroute to dustinsenos.com (70.32.89.124), 64 hops max, 52 byte packets
1 okdg (192.168.1.1) 4.277 ms 0.766 ms 0.699 ms
2 192.168.3.1 (192.168.3.1) 1.127 ms 1.159 ms 1.205 ms
3 * * *
4 rd1ht-tge1-2-5.ok.shawcable.net (64.59.172.19) 14.103 ms 24.217 ms 14.039 ms
5 rc2wh-tge0-1-2-0-2.vc.shawcable.net (66.163.77.17) 17.990 ms 33.024 ms 19.185 ms
6 66.163.78.10 (66.163.78.10) 22.059 ms 24.539 ms 17.021 ms
7 tge3-4.fr3.yvr2.llnw.net (68.142.125.49) 19.780 ms 35.786 ms 20.643 ms
8 tge6-2.fr3.yyz.llnw.net (68.142.125.21) 80.303 ms 81.896 ms 79.723 ms
9 tge8-1.fr3.lga.llnw.net (69.28.172.73) 86.251 ms 81.036 ms 79.788 ms
/*
Enable these styles: http://webdesign.about.com/od/css/ht/htcssusersafari.htm
*/
/* Twitter Styles */
#recommended_users { display: none; }
#trends { display: none; }
.promotion.round { display: none; }