Skip to content

Instantly share code, notes, and snippets.

View Twipped's full-sized avatar
🗯️
Cursing out Typescript

Jocelyn Badgley Twipped

🗯️
Cursing out Typescript
View GitHub Profile
<!--[if lt IE 9]><script>var e = ("abbr,article,aside,audio,canvas,datalist,details,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video").split(',');for (var i = 0; i < e.length; i++) document.createElement(e[i]);</script><![endif]-->
<!DOCTYPE HTML>
<html lang="ru-RU">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css" media="screen">
.dotlist {
text-align:center;
font-size:1px; /*This removes any whitespace between the elements*/
}
var _DoItalicsAndBold = function (text) {
// <strong> must go first:
text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g, "<strong>$2</strong>");
text = text.replace(/(\w)_(\w)/g, "$1~E95E$2"); // ** GFM ** "~E95E" == escaped "_"
text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g, "<em>$2</em>");
return text;
};
article,aside,audio,canvas,footer,header,hgroup,menu,nav,section,video {display:block;}
@Twipped
Twipped / UnixMailNotifier.sh
Created August 19, 2011 16:56
Local mail growl notification
#!/bin/bash
export mvar=`mail -H |tail -1 |sed -n 's/\(..*"\)\([^"][^"].*\)\(["].*\)/\2/p'`
/usr/bin/osascript <<-EOF 2>/dev/null 1>&2
tell application "GrowlHelperApp"
try
set the allNotificationsList to ¬
{"Unix Mail Notification"}
set the enabledNotificationsList to ¬
{"Unix Mail Notification"}
register as application ¬
<?php
class SaltedHash {
protected $salt;
protected $active_hash;
const SALT_LENGTH = 15;
function __construct($hash=null) {
$this->active_hash = $hash;
@Twipped
Twipped / iPadFullscreenDebug.css
Created February 23, 2012 02:29
CSS Media Query for testing fullscreen ipad web apps
@media screen and (min-device-width: 800px) {
body {
width:1024px;
height:748px;
margin:20px auto;
background:black;
border:1px solid red;
}
html {
background:gray;
new Effect.Parallel([
new Effect.Move(previousBackdrop, { sync: true, x:w, mode: 'absolute' }),
new Effect.Move(nextBackdrop, { sync: true, x:0, mode: 'absolute' }),
new Effect.Fade(previousTabHilight, {sync:true}),
new Effect.Appear(nextTabHilight, {sync:true}),
new Effect.Morph(previousTab, {style:'normal'}),
new Effect.Morph(nextTab, {style:'selected'})
], {
duration: 0.8,
transition: Effect.Transitions.easeOutQuad,
Accordion.animating = true;
$(previousBackdrop).animate({left:w}, 0.8, "easeOutQuad", function() {this.hide();Accordiun.animating = false;});
$(nextBackdrop).animate({left:0}, 0.8, "easeOutQuad");
$(previousTabHighlight).fadeOut(0.8, "easeOutQuad");
$(nextTabHighlight).fadeIn(0.8, "easeOutQuad", function() {this.className = 'selected';});
$(previousTab).switchClass('selected','normal', 0.8);
$(nextTab).switchClass('normal','selected', 0.8);