Skip to content

Instantly share code, notes, and snippets.

@evanc
evanc / gist:2572542
Created May 2, 2012 00:08
JSON of a tweet with a long URL.
{
"created_at": "Wed May 02 00:07:05 +0000 2012",
"id": 197477274109493250,
"id_str": "197477274109493248",
"text": "@johnnyryall http://t.co/i90NrnGT",
"source": "<a href=\"http://itunes.apple.com/us/app/twitter/id409789998?mt=12\" rel=\"nofollow\">Twitter for Mac</a>",
"truncated": false,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": 539267546,
@evanc
evanc / gist:1719920
Created February 1, 2012 22:39
Jira styles
/* prevent top "stalker" bar from following viewport */
#header {opacity: 1 !important;}
#stalker {
position: static !important;
}
.stalker-placeholder, #stalker .btm {
display: none;
}
/* don't display useless stuff */
@evanc
evanc / mixHeidth.js
Created August 27, 2011 23:44
jquery plugin- find the max/min height/width of a collection of elements.
(function($) {
var getExtreme = function(extreme, dimension) {
return Math[extreme].apply(undefined, ($.makeArray($(this).map(function() {
return $(this)[dimension]();
}))));
};
$.fn.maxHeight = function() {
return getExtreme.apply(this, ['max', 'height']);
@evanc
evanc / gist:1076018
Created July 11, 2011 14:53
imgur jQuery File Upload plugin
(function ($) {
var n = 'undefined',
func = 'function',
UploadHandler, methods, MultiLoader = function (b) {
var c = 0,
list = [];
this.complete = function () {
c += 1;
if (c === list.length + 1) {
b(list);
var Cat = function (name) {
this.name = name;
}
var myCat = new Cat('fluffy');
console.log(myCat.name); // fluffy
(function () {
var messageStore = ecp.EmailCenter.tabs.findById('inbox').findByType('listinggrid')[0].store, lastAlerted = new Date(), movie;
var playerURLParams = {
enablejsapi: 1
,playerapiid: 'tadamovie'
};
Ext.getBody().createChild({style: 'display: none;', id: playerURLParams.playerapiid + 'c'});
var playerURL = 'http://www.youtube.com/apiplayer?' + Ext.urlEncode(playerURLParams);
swfobject.embedSWF(playerURL, playerURLParams.playerapiid + 'c', 1, 1, '8', false, false, {allowScriptAccess: 'always'}, {id: playerURLParams.playerapiid});