Skip to content

Instantly share code, notes, and snippets.

(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});
var Cat = function (name) {
this.name = name;
}
var myCat = new Cat('fluffy');
console.log(myCat.name); // fluffy
@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);
@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: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 / 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,
<h1>Some html</h1>
<img src="http://placekitten.com.s3.amazonaws.com/homepage-samples/410/287.jpg" />
<h1>different html</h1>
<img src="http://placekitten.com/400/300" />
@evanc
evanc / gist:8027313
Last active December 31, 2015 18:29
User style to transform "red" issues on the JIRA rapidboard to something friendlier to users with color-vision deficiency
[style*="#ff0000"], [style*="#fc0000"] {
width: 16px !important;
background-color: #333333 !important;
background: url(https://jira.paloalto.com/images/icons/hazard.gif) center center;
}
[style*="#fad419"] {
width: 10px !important;
background-color: #cccccc !important;
background: url(https://jira.paloalto.com/images/icons/bullet_orange.png) center center;
public static void main (String[] args) {
Turtle bobTheBuilder = new Turtle();
drawWindow(bobTheBuilder, 100, 50);
drawWindow(bobTheBuilder, 400, 50);
}
public static void drawWindow(Turtle myTurtle, int x, int y) {
myTurtle.move(x, y);
myTurtle.paint(0, 40);