Skip to content

Instantly share code, notes, and snippets.

View LibertysYarn's full-sized avatar

Liberty LibertysYarn

View GitHub Profile
.ch-grid {
margin: 20px 0 0 0;
padding: 0;
list-style: none;
display: block;
text-align: center;
width: 100%;
}
.ch-grid:after,
@LibertysYarn
LibertysYarn / checkboard.css
Created June 2, 2013 01:38
Checkerboard CSS - from Lea Verou
body {
background-image:
-moz-linear-gradient(45deg, #000 25%, transparent 25%),
-moz-linear-gradient(-45deg, #000 25%, transparent 25%),
-moz-linear-gradient(45deg, transparent 75%, #000 75%),
-moz-linear-gradient(-45deg, transparent 75%, #000 75%);
background-image:
-webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, #000), color-stop(.25, transparent)),
-webkit-gradient(linear, 0 0, 100% 100%, color-stop(.25, #000), color-stop(.25, transparent)),
-webkit-gradient(linear, 0 100%, 100% 0, color-stop(.75, transparent), color-stop(.75, #000)),
@LibertysYarn
LibertysYarn / style.css
Created June 18, 2013 15:28
Animated Circular Image Gallery - Josh Johnson A full tutorial for this project can be found on - http://designshack.net/articles/css/circlegallery/ - Design Shack.
* {
margin: 0;
padding: 0;
-webkit-backface-visibility: hidden;
}
body {
background: #222;
}
@LibertysYarn
LibertysYarn / pagefold.css
Created June 18, 2013 15:31
Page Fold - Josh Johnson a complete tutorial for the page fold effect on - http://designshack.net/articles/css/code-a-simple-folded-corner-effect-with-css/
* {
margin: 0;
padding: 0px;
}
body {
background: #272822;
}
.page {
@LibertysYarn
LibertysYarn / taped.css
Created June 18, 2013 15:32
Taped Corner images - Josh Johnson
* {
margin: 0;
padding: 0;
}
body {
background: #222;
}
#container {
@LibertysYarn
LibertysYarn / Ivy-leaf.css
Created October 21, 2013 20:08
End Article with an Ivy Leaf - CSS-Tricks
p:last-child:after {
content: "\2766"; /* Here comes the ivy leaf */
font-size: 150%; /* Makes the leaf larger than the normal text */
padding-left: 10px; /* Leaf won't clash with the last letter of the text */
float: right; /* Horizontal position is set to the right edge of the column */
position: relative; /* This is just an homage to Albert Einstein */
top: 15px /*Vertical distance from the last line of text */
}
@LibertysYarn
LibertysYarn / amp.html
Created October 21, 2013 20:10
Fancy Ampersand - CSS-Tricks
Script <span class="amp">&amp;</span> Style
@LibertysYarn
LibertysYarn / Current year only.php
Created October 21, 2013 20:18
Automatic Copyright Year - CSS-Tricks
&copy; <?php echo date("Y") ?>
@LibertysYarn
LibertysYarn / Add to functions.php
Created October 21, 2013 20:22
Get The First Image From a Post -- CSS-tricks
function catch_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = $matches[1][0];
if(empty($first_img)) {
$first_img = "/path/to/default.png";
@LibertysYarn
LibertysYarn / gmail.rb
Created January 29, 2014 01:38
Send email with GMail SMTP
ActionMailer::Base.smtp_settings = {
:enable_starttls_auto => true, #this is the important shit!
:address => 'smtp.gmail.com',
:port => 587,
:domain => 'your.domain.com',
:authentication => :plain,
:user_name => 'login@your.domain.com',
:password => 'assword'
}