Skip to content

Instantly share code, notes, and snippets.

View stanosmith's full-sized avatar
☯️
👽

Stanley Smith stanosmith

☯️
👽
View GitHub Profile
ExternalInterface.call("ntptAddPair", "level2","Homepage");
ExternalInterface.call("ntptAddPair", "s_channel","Homepage");
ExternalInterface.call("ntptEventTag", "ev=flash screen");
ExternalInterface.call("ntptEventTag", "ev=event17");
@stanosmith
stanosmith / LICENSE.txt
Created November 2, 2011 01:44 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@stanosmith
stanosmith / gist:2296167
Created April 3, 2012 23:01
AS3: GS Fade Out Auto
TweenMax$(EntryPoint).to($(Clipboard), .5, { autoAlpha:1 } );
@stanosmith
stanosmith / gist:2347043
Created April 9, 2012 22:22
CSS: Sticky Footer
html, body {
height: 100%;
}
#container {
min-height: 100%;
}
#main {
overflow: auto;
@stanosmith
stanosmith / gist:2347161
Created April 9, 2012 22:49
HTML: Sticky Footer
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>StickyFooter</title>
<style type="text/css" media="screen">
/* must declare 0 margins on everything, also for main layout components use padding, not
vertical margins (top and bottom) to add spacing, else those margins get added to total height
and your footer gets pushed down a bit more, creating vertical scroll bars in the browser */
* {
@stanosmith
stanosmith / gist:2378835
Created April 13, 2012 18:03
AS3: Remove Whitespace
private var whitespace:String = " \t\n\r"; /**< Whitespace characters (space, tab, new line and return). */
private function removeWhitespace(source:String):String {
var pattern:RegExp = new RegExp('[' + whitespace + ']', 'g');
return source.replace(pattern, '');
}
@stanosmith
stanosmith / gist:2424279
Created April 19, 2012 21:19
HTML: If less than IE 7
<!--[if lt IE 7]>
<div id="ie6alert">
<p><strong>Warning:</strong> We do not support the <a href="http://en.wikipedia.org/wiki/Web_browser" title="What is a web browser, you ask?" target="_blank" class="help">web browser</a> you are using, and cannot guarantee a problem free experience. Please upgrade to one of these modern web browsers (they&rsquo;re free):</p>
<ul>
<li><a href="http://www.mozilla.com/en-US/firefox/firefox.html" title="Download Firefox for Windows, Mac OS X, and Linux">Mozilla Firefox 3.5+</a></li>
<li><a href="http://www.apple.com/safari/" title="Download Safari for Mac OS X and Windows">Apple Safari 3.0+</a></li>
<li><a href="http://www.google.com/chrome?brand=CHFV" title="Download Google Chrome for Windows, Mac OS X, and Linux">Google Chrome 4.0+</a></li>
<li><a href="http://www.opera.com/download/" title="Download Opera for Windows, Mac OS X and Linux">Opera 9.5+</a></li>
<li><a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx" title="Download a newer Int
@stanosmith
stanosmith / gist:2481300
Created April 24, 2012 16:38
CSS: * { box-sizing: border-box } FTW
/* apply a natural box layout model to all elements */
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
@stanosmith
stanosmith / gist:2511057
Created April 27, 2012 17:31
HTML: Resize Facebook iframe FB.Canvas.setSize
<!DOCTYPE html>
<html lang="en">
<head>
<style type="text/css">
/* Hide the FB Root div */
#fb-root {
display: none;
}
is_shown=$(defaults read com.apple.finder AppleShowAllFiles)
if [ $is_shown != "YES" ]; then
defaults write com.apple.finder AppleShowAllFiles TRUE
else
defaults write com.apple.finder AppleShowAllFiles FALSE
fi