This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // We need a textarea for IE, too: <textarea id="pasteField"></textarea> | |
| $( '#pasteField' ).bind( 'paste', function( evt ) { | |
| // In true Microsoft form, the type to get plain text is Text with a captial T. | |
| console.log( window.clipboardData.getData( 'Text' ) ); | |
| } ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Safe to say...textarea is a good idea: <textarea id="pasteField"></textarea> | |
| $( '#pasteField' ).on( 'paste', function( evt ) { | |
| // Safari has a weird "types" list that we need to loop through and no "items" array. | |
| var i = 0, items = [], item, key = 'text/plain', kind = 'string'; | |
| while (i < evt.originalEvent.clipboardData.types.length) { | |
| var key = evt.originalEvent.clipboardData.types[i]; | |
| if( !key.match( /(text\/)|(plain-text)/i ) ) { | |
| kind = 'file'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // iOS Media Queries | |
| // Goal: capture styles for iPhone, iPhone 3G, iPhone 3GS, iPhone 4, iPhone 4S, iPad, and iPad 2 | |
| // | |
| // Author: Tony Schneider (@tonywok) | |
| // Please tell me where I fail. :) | |
| // iPhone v(4,4S) portrait | |
| // test: black text (overwritten by v* portrait) with blue background | |
| @media all and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) { | |
| a { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var express = require('express'); | |
| var util = require('util'); | |
| var oauth = require('oauth'); | |
| var app = express.createServer(); | |
| var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY"; | |
| var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET"; | |
| function consumer() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Create a “marker” overlay. | |
| var markerImage = gapi.hangout.av.effects.createImageResource( 'https://donuthorns.appspot.com/static/x.png' ) | |
| , marker = markerImage.createOverlay( { | |
| scale: { | |
| magnitude: 0.25 | |
| , reference: gapi.hangout.av.effects.ScaleReference.HEIGHT | |
| } | |
| } ); | |
| marker.setVisible( true ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @cdn: "rons-house"; | |
| .add-bg(@url) { | |
| background-image: url(@url); | |
| } | |
| .foo { | |
| .add-bg("@{cdn}/bar.png"); // why not this? | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*jslint undef: true, nomen: true, eqeqeq: true, plusplus: true, newcap: true, immed: true, browser: true, devel: true, passfail: false */ | |
| /*global window: false, readConvertLinksToFootnotes: false, readStyle: false, readSize: false, readMargin: false, Typekit: false, ActiveXObject: false */ | |
| var dbg = (typeof console !== 'undefined') ? function(s) { | |
| console.log("Readability: " + s); | |
| } : function() {}; | |
| /* | |
| * Readability. An Arc90 Lab Experiment. | |
| * Website: http://lab.arc90.com/experiments/readability |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openssl base64 < file.png | tr -d '\n' | pbcopy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @import "compass/utilities/sprites"; | |
| @import "compass/css3/background-size"; | |
| // Define the sprites here. Notice that I've added an optional spacing. | |
| $sprites: sprite-map("my-sprites/*.png", $spacing: 20px); | |
| $sprites2x: sprite-map("my-sprites-retina/*.png", $spacing: 40px); | |
| // Now let's define the sprite mixin. | |
| // This delegates to the reusable retina-sprite mixin. | |
| @mixin sprite($name){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [color] | |
| branch = auto | |
| diff = auto | |
| status = auto | |
| [color "branch"] | |
| current = yellow reverse | |
| local = yellow | |
| remote = green | |
| [color "diff"] | |
| meta = yellow bold |