Skip to content

Instantly share code, notes, and snippets.

tell application "System Events"
tell application "Finder"
set _b to bounds of window of desktop
set _width to item 3 of _b
set _height to item 4 of _b
end tell
tell application "Safari"
set bounds of every window to { 0 , 0 , _width - 555 , _height }
end
#!/usr/bin/env ruby -wKU
require "rubygems"
# sudo gem install rubyosa
require "rbosa"
a = `osascript -e 'tell application "Finder" to get bounds of window of desktop'`
desktop_bounds = a.split(", ").collect{|i| i.to_i}
x1 = desktop_bounds[0]
jQuery.fn.fadeOnClick = function( item ) {
this.click(function(){
$("#home").children().fadeOut( 200 );
setTimeout( function(){
$(item).fadeIn();
} , 200 );
});
return this;
}
...
<div class="course" >
<div class="toggle-button">Show</div>
<div class="course-information">
<div>...and this is another subtitle</div>
<div>2009-05-23 04:00:00</div>
<div>Classroom LS B109</div>
<div width="20%">It's a proven fact that students learn best when they are engaged in class materials and discussion. Attend this interactive hands-on workshop to see how CPS Clicker technology from e-Instruction promotes student participation and engagement in the classroom.</div>
</div>
</div>
$("tr.dataline").click(function ()
{
$.getJSON("test.php",{wid:id},
function(data){
var table = $("<table class='user'><tbody><tr><th>Netid</th><th>Last</th><th>First</th><th>Email</th><th>Completed</th><th>Certificate Sent</th><th>Date</th></tr></tbody></table>");
jQuery.each(data.roster, function(i, roster) {
var row = $("<tr />");
var properties = ["netid","lastname","firstname","email","completed","certificate_sent","date"];
$.each( properties , function(i,property){
iris - the ultimate image editor for mac os x
http://nolobe.com/iris/
acorn - the image editor for humans
http://flyingmeat.com/acorn/
Pixelmator - Mac OS X Image editor for the rest of us.
http://www.pixelmator.com
ChocoFlop - Non-destructive image editing for your mac
jQuery.fn.quickCheckout = function( url ) {
var form = $("<form />")
.attr({ action:url, method:"POST"})
.append("<input type='submit' />")
.appendTo(this);
this.data( "quickCheckoutForm" , form );
return this;
}
jQuery.fn.quickCheckoutAdd = function( name , value) {
(function($) {
var bind_help = function (form, field, message) {
var displayHelp = $.trim(field.val()).length===0;
form.bind('submit', function () {
return displayHelp;
});
field.blur(function () {
displayHelp = $.trim(field.val()).length===0;
});
three = lambda {|a,b,c| puts "#{a} #{b} #{c}"}
three.call(1,2,3)
three.call(*[3,2,1])
$(function() {
$('#leftImage1On, #leftImage2On, #leftImage3On, #leftImage4On')
.hide().mouseout( function () {
var imageNum = '#' + $(this).attr('id') + 'On';
$(imageNum).hide();
});
$('#leftNavBox area').mouseover(function() {
var imageNum = '#' + $(this).attr('id') + 'On';
$(imageNum).show();
});