Skip to content

Instantly share code, notes, and snippets.

View heroheman's full-sized avatar
🏠
Working from home

Flowrence heroheman

🏠
Working from home
View GitHub Profile
@heroheman
heroheman / gist:979561
Created May 18, 2011 21:05
SASS: Cross Browser Transparency Mixin
@mixin opacity($value)
opacity: #{"." + $value}
filter: alpha(opacity=$value)
-ms-filter: "alpha(opacity=$value)"
-khtml-opacity: #{"." + $value}
-webkit-opacity: #{"." + $value}
-moz-opacity: #{"." + $value}
.opacity
@include opacity(80)
@heroheman
heroheman / heighttoggle.js
Created October 6, 2011 14:57
jQuery: Height Toggle
$('#toggleReiseziele').click(function(){
if($(this).hasClass('toggleUp')){
$('#footer').animate({height:'500'},'slow');
}else{
$('#footer').animate({height:'200'},'slow');
}
$('#toggleReiseziele').toggleClass('toggleUp');
});
@heroheman
heroheman / gist:1269937
Created October 7, 2011 09:58
jQuery: Scroller (bspw. für Akkordeons)
$('html, body').animate({
scrollTop: $(‘#element’).offset().top
}, 2000);
@heroheman
heroheman / placeholdit.sublime-snippet
Created February 21, 2012 09:41
Snippet: Sublime Placehold.it
<snippet>
<content><![CDATA[
<img src="http://placehold.it/${1:100}x${2:100}" alt="${3:Alt text}"/>
]]></content>
<tabTrigger>dummy</tabTrigger>
</snippet>
@heroheman
heroheman / label (1).less
Created February 22, 2012 09:38
Less: small label css declaration
.label{
display: inline-block;
position: relative;
text-transform: uppercase;
text-decoration: none;
color: white;
&:visited{color: @white;}
}
@heroheman
heroheman / gist:1922601
Created February 27, 2012 08:40
Misc: Using Less on a local windows machine
"C:\path\to\chrome.exe" --allow-file-access-from-files
@heroheman
heroheman / livereload.js
Created March 6, 2012 14:09
Javascript: LiveReload for Less CSS
<!-- Live Reload für Less -->
<script type="text/javascript" charset="utf-8">
less.env = "development";
less.watch();
</script>
@heroheman
heroheman / .htaccess
Created March 21, 2012 00:04 — forked from ScottPhillips/.htaccess
htaccess: 301 Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@heroheman
heroheman / functions.php
Created March 21, 2012 21:00
Wordpress: Add Custom Image Size
//custom imagesize
add_action( 'after_setup_theme', 'setup' );
function setup() {
// ...
add_theme_support( 'post-thumbnails' );
// This feature enables post-thumbnail support for a theme
// To enable only for posts:
// add_theme_support( 'post-thumbnails', array( 'post' ) );
// To enable only for posts and custom post types:
@heroheman
heroheman / arrows.css
Created May 29, 2012 10:15
CSS3: CSS-only Triangles
/*<div class="arrow-up"></div>
<div class="arrow-down"></div>
<div class="arrow-left"></div>
<div class="arrow-right"></div>*/
/*Source: http://css-tricks.com/snippets/css/css-triangle/*/
.arrow-up {
width: 0;
height: 0;