Skip to content

Instantly share code, notes, and snippets.

View ticky's full-sized avatar
💽

Jessica Stokes ticky

💽
View GitHub Profile
@ticky
ticky / hypercam.css
Created February 8, 2012 05:16
Unregistered HyperCam 2
/* Unregistered HyperCam 2 */
/* Simulates web pages being recorded through the shareware version of HyperCam 2 */
/* Paste this into your User CSS, with whatever site(s) you want to deface in this manner selected. */
/* There seems to be a bug in Safari 5/OS X where if you apply -webkit-font-smoothing to a body:before element, it will sometimes freak out all over the page. This fixes that (somehow) and looks nicer to boot. */
html { -webkit-font-smoothing: antialiased; }
body:before {content: "Unregistered HyperCam 2"; position: fixed; top: 0; left: 0; color: #000; background-color: #fff; font-family: "MS Sans Serif", "Microsoft Sans Serif", Verdana; -webkit-font-smoothing: none; font-weight: bold; font-size: 14px; z-index: 9999; }
javascript:(function(){if (!document.getElementById('someuniqueid')){var objHead = document.getElementsByTagName('head'); if (objHead[0]){if (document.createElementNS && objHead[0].tagName == 'head') var objCSS = objHead[0].appendChild(document.createElementNS('http://www.w3.org/1999/xhtml', 'link')); else var objCSS = objHead[0].appendChild(document.createElement('link')); objCSS.id = 'someuniqueid'; objCSS.rel = 'stylesheet'; objCSS.href = 'data:text/css,*{-webkit-transform-style:preserve-3d;-webkit-transition:-webkit-transform 1s ease-in-out,box-shadow 1s ease-in-out,outline 1s ease-in-out}*:hover{background:rgba(255,255,255,.25);outline:1px solid rgba(0,0,0,.25);-webkit-transform:translateZ(100px);box-shadow:0 0 10px #cacaca}html{-webkit-transition:-webkit-transform 1s ease-in-out}html:hover{-webkit-transform:perspective(800px) rotateY(10deg) translateZ(-700px)}body{height:100%}'; objCSS.type = 'text/css';}}})()
@ticky
ticky / browser-regex.md
Last active October 19, 2023 23:13
Browser and Version regex

Browser and Version Regular Expression 2.0

(MSIE|(?!Gecko.+)Firefox|(?!AppleWebKit.+Chrome.+)Safari|(?!AppleWebKit.+)Chrome|AppleWebKit(?!.+Chrome|.+Safari)|Gecko(?!.+Firefox))(?: |\/)([\d\.apre]+)

This regular expression is capable of retrieving the browser and version for the following browsers;

  • Internet Explorer
  • Firefox (INCLUDING alpha and "pre" versions)
  • Other browsers reporting a "Gecko" version in their user agent
  • Chrome
  • Safari
  • Other browsers reporting an "AppleWebKit" version in their user agent
@ticky
ticky / isComplete.py
Last active October 12, 2015 20:47
Detect if a set of numbers is complete and consecutive
#!/bin/env python
# coding: utf-8
items = [
[1, 2, 3, 5, 6, 7, 7, 8, 9, 10,11,12], # false
[2, 3, 4, 5, 6, 7, 8, 9, 10,11,12], # false
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], # true
[1, 2, 2, 4, 5, 6, 7] , # false
[1, 2, 3, 4, 5, 7] , # false
[3, 5, 1, 2, 4] # true
@ticky
ticky / jquery-latests.md
Last active October 13, 2015 06:08
jQuery Latests

jQuery Latests

The latest maintenance releases of each minor version of jQuery as of the update time.

Current

2.0 (No IE<9 Support)

2.0.3 Minified Release Notes

1.10

@ticky
ticky / show-ids.css
Created April 12, 2013 07:58
User CSS to display element IDs where applicable. (Running this in your regular browsing will _break everything_, so don't!)
*[id]:before {
box-sizing: border-box;
content: "#"attr(id);
display: inline-block;
background-image: -webkit-gradient( radial, 50% 100%, 0, 50% 100%, 100, from(rgba(89, 208, 244, 1)), to(rgba(89, 208, 244, 0))), -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4FBBF7), to(#3FAEEB));
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 9px;
font-weight:lighter;
text-align:center;
line-height: 12px;
@ticky
ticky / feedbin-instapaper-text.js
Created April 30, 2013 03:12
Use this as a "share" URL in Feedbin and it'll inject an iframe with Instapaper's formatted version of the page inline.
javascript:(function(url) {feedbin_instaframe=document.createElement('iframe');feedbin_instaframe.src="http://www.instapaper.com/text?u="+url;feedbin_instaframe.style.width="100%";feedbin_instaframe.style.height="100%";feedbin_instaframe.style.border="1px solid #cacaca";feedbin_content_object=document.querySelector("div[data-behavior='entry_content_wrap']");feedbin_content_object.parentNode.appendChild(feedbin_instaframe);feedbin_content_object.style.display="none";}("${url}"));
@ticky
ticky / dabblet.css
Created May 18, 2013 11:09
Windows 98
/**
* Windows 98
*/
body {
-webkit-font-smoothing: none;
font-family: "MS Sans Serif", "Microsoft Sans Serif";
margin: 0;
padding: 0;
background-color: #008080;
@ticky
ticky / dabblet.css
Created June 19, 2013 05:29
Status Icons
/**
* Status Icons
*/
div {
font-size: 15px;
}
circle.active {
fill: rgba(124,198,0,0.7);
}
circle.inactive {
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code