Skip to content

Instantly share code, notes, and snippets.

@jcsrb
jcsrb / gist:1496554
Created December 19, 2011 10:37
facebook, twitter, google plus in addthis all with vertical count
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=YOUR-PROFILE-ID"></script>
<div class="addthis_default_style">
<a class="addthis_button_facebook_like" fb:like:layout="box_count" fb:like:width="48" fb:like:height="63"></a>
<div class="clearfix"></div>
<a class="addthis_button_tweet" tw:count="vertical"></a>
<div class="clearfix"></div>
<a class="addthis_button_google_plusone" g:plusone:size="tall"></a>
</div>
@jcsrb
jcsrb / article_image_uploader.rb
Created December 22, 2011 15:02
CarrierWave extension fix_exif_rotation, strip, quality, resize_to_fill_if_larger
class ArticleImageUploader < ImageUploader
process :fix_exif_rotation
process :strip
process :convert => 'jpg'
process :quality => 85 # Percentage from 0 - 100
version :gallery_thumb do
process :resize_to_fill => Settings.images.article_images.processing.gallery_thumb #44x44
end
@jcsrb
jcsrb / dabblet.css
Created January 2, 2012 21:45
Untitled
#heart {
transform: rotate(45deg);
position: relative;
width: 250px;
height: 250px;
margin: 200px auto;
}
#heart div {
@jcsrb
jcsrb / dabblet.css
Created January 2, 2012 21:52
Untitled
#heart {
transform: rotate(45deg);
position: relative;
width: 250px;
height: 250px;
margin: 200px auto;
}
#heart div {
@jcsrb
jcsrb / dabblet.css
Created January 2, 2012 22:00
Untitled
#heart {
transform: rotate(45deg);
position: relative;
width: 250px;
height: 250px;
margin: 200px auto;
}
#heart div {
@jcsrb
jcsrb / example.html
Created January 5, 2012 13:55
jQuery Hover actions
<a
data-hover-actions="true"
data-hover-text="remove from favourites"
data-hover-class="ui button orange follow"
class="ui button green active follow"
href="/toggle_favourite"
>
<span class="icon"></span>
is one of your favourites
</a>
@jcsrb
jcsrb / dabblet.css
Created January 11, 2012 13:09
Panel Styles
/**
* Panel Styles
*/
/*body_bg.png*/
body{ background: url(http://i.imgur.com/9OqsE.png);}
body > div{
margin-top:20px;
margin-left:20px;
min-height: 240px;
min-width: 240px;
// taken from https://github.com/lokesh/color-thief
/*
CanvasImage Class
Class that wraps the html image element and canvas.
It also simplifies some of the canvas context manipulation
with a set of helper functions.
*/
var CanvasImage = function(image){
// If jquery object is passed in, get html element
this.imgEl = (image.jquery)? image[0]: image;
@jcsrb
jcsrb / custom-post-class.php
Created January 15, 2012 14:46
Wordpress Custom Class for Post
<?php
/*
Plugin Name: Custom Post Class
Description: add a custom class to your post, use 'post-class' as custom field
Version: 1.0
Author: Jakob Cosoroaba
Author URI: http://jakob.cosoroaba.ro/
*/
function extra_post_class($classes) {
/**
* Spectrum http://simpledesktops.com/browse/desktops/2012/jan/19/spectrum/
*/
body{
background: #333232;
min-height:100%;
}
#circles{