Skip to content

Instantly share code, notes, and snippets.

View blissdev's full-sized avatar

Jordan Arentsen blissdev

View GitHub Profile
>> pp AlbumItem.find(:all, :conditions => { :payloadz_item_number => nil })
[#<AlbumItem id: 20, title: "WHO BETTER THAN NERO", album_id: 7, created_at: "2009-03-03 21:47:09", updated_at: "2009-03-03 21:47:09", genre_id: 65, artist_id: 38, mature_content: false, producer: nil, writer: nil, additional_instrumentation: nil, payloadz_item_number: nil, payloadz_item_name: nil>,
#<AlbumItem id: 22, title: "WHO BETTER THAN NERO", album_id: 7, created_at: "2009-03-03 21:56:01", updated_at: "2009-03-03 21:56:01", genre_id: 65, artist_id: 38, mature_content: false, producer: nil, writer: nil, additional_instrumentation: nil, payloadz_item_number: nil, payloadz_item_name: nil>,
#<AlbumItem id: 26, title: "cant tahe know more", album_id: 25, created_at: "2009-03-03 22:16:34", updated_at: "2009-03-03 22:16:34", genre_id: 65, artist_id: 61, mature_content: true, producer: nil, writer: nil, additional_instrumentation: nil, payloadz_item_number: nil, payloadz_item_name: nil>,
#<AlbumItem id:
Index: stylesheets/styles.css
===================================================================
--- stylesheets/styles.css (revision 300)
+++ stylesheets/styles.css (working copy)
@@ -20,7 +20,7 @@
background: #fff url("../images/backgroundGradient.gif") repeat-x;
border-left: 1px #222 solid;
border-right: 1px #222 solid;
- font-size: 1.0em;
+ font-size: 1.0em;
# At the first word-break past length, span the rest of the string with a
# class 'full-text' and append a link with a class of 'more-link'.
#
# This is tightly coupled to the page_scripts added to
# views/shop/results.rhtml and the knowledge that the category sidebar text
# is going to be rendered within a p tag.
def hide_past text, length=200, interstitial="..." # ought to take options for link_text, link_class, and span_class
return text if text.length <= length
text.sub(/\A(.{0,#{length}}\b)(.*?)(<\/p>)?\z/m) {|match|
$1 + content_tag(:span, $2, :class => 'full-text') +
(function ($) {
jQuery.fn.newMethod = function(){
return this.each(function(){
alert(this);
});
};
$("#accordion").newMethod();
})(jQuery);
<img src="<?php bloginfo('template_directory'); ?>/style/images/twitter_bird.png" width="62" height="83" alt="">
---> Staging yap into destroot
Error: Target org.macports.destroot returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_yap/work/Yap-5.0.1" && /usr/bin/make install DESTDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_yap/work/destroot " returned error 2
Command output: :- prolog:compile_expressions failed.
:- prolog:[yio.yap,debug.yap,consult.yap,checker.yap,depth_bound.yap,grammar.yap,ground.yap,listing.yap,preds.yap,modules.yap,signals.yap,profile.yap,callcount.yap,load_foreign.yap,sockets.yap,sort.yap,setof.yap,statistics.yap,strict_iso.yap,tabling.yap,threads.yap,yapor.yap] failed.
:- prolog:thread_local([idb:$debug/0,idb:$trace/0,idb:$spy_skip/0,idb:$spy_stop/0]) failed.
:- prolog:[protect.yap] failed.
:- prolog:op(1150,fx,mode) failed.
:- prolog:dynamic extensions_to_present_answer/1 failed.
:- prolog:[corout.yap,arrays.yap] failed.
:- prolog:default_sequential(off) faile
get: function(uri, vars) {
var payload;
$.getJSON(uri, vars, function(data) {
console.log(["data", data]);
payload = data;
});
console.log(["payload", payload]);
return payload;
}
var template = '<td class="not-reservable{{#last}} last{{/last}} {{#rowspan}} rowspan2{{/rowspan}}"{{#rowspan}} rowspan="2"{{/rowspan}}><div class="cell-container"><span class="room-number">&nbsp;</span><div class="info">{{desc}}</div></div></td>';
<li>
<div class="group-image"><?php echo bp_get_group_avatar_thumb( $group ); ?></div>
<a href="<?php echo bp_get_group_permalink( $group ) ?>" title="<?php echo bp_get_group_name( $group ) ?>" class="group-link">
<?php echo bp_get_group_name( $group ) ?>
</a>
<span class="group-member"><?php echo $group->total_member_count . __(' member', 'buddypress'); ?></span>
<div class="wrapper"></div>
</li>
@blissdev
blissdev / gist:318097
Created March 1, 2010 05:12
Add colors and git to prompt.
export TERM="xterm-color"
alias ls="ls -G"
export EDITOR=mate
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"