Skip to content

Instantly share code, notes, and snippets.

View LibertysYarn's full-sized avatar

Liberty LibertysYarn

View GitHub Profile
@LibertysYarn
LibertysYarn / Pomodoro App.markdown
Last active November 15, 2015 02:57
Pomodoro App
/* init css */
body{100%}
ul{ list-style:none; margin:0; padding:0; }
a{ color:#000; text-decoration:none;}
/* hexagon */
ul > li{
position:relative;
width:30px;
height:33px;
.hex {
float: left;
margin-left: 3px;
margin-bottom: -26px;
}
.hex .top {
width: 0;
border-bottom: 30px solid #6C6;
border-left: 52px solid transparent;
border-right: 52px solid transparent;
.colorgraph {
height: 5px;
border-top: 0;
background: #c4e17f;
border-radius: 5px;
background-image: -webkit-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
background-image: -moz-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
background-image: -o-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
background-image: linear-gradient(to right, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%,
@LibertysYarn
LibertysYarn / timeline.css
Created January 30, 2014 23:04
Responsive Timeline - Bootstrap 3
.timeline {
list-style: none;
padding: 20px 0 20px;
position: relative;
}
.timeline:before {
top: 0;
bottom: 0;
position: absolute;
body{
background: url(http://mymaplist.com/img/parallax/back.png);
background-color: #444;
background: url(http://mymaplist.com/img/parallax/pinlayer2.png),url(http://mymaplist.com/img/parallax/pinlayer1.png),url(http://mymaplist.com/img/parallax/back.png);
}
.vertical-offset-100{
padding-top:100px;
}
@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'
}
@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 / Current year only.php
Created October 21, 2013 20:18
Automatic Copyright Year - CSS-Tricks
&copy; <?php echo date("Y") ?>