Skip to content

Instantly share code, notes, and snippets.

View geoffreycrofte's full-sized avatar
📚
Writing books

Geoffrey Crofte geoffreycrofte

📚
Writing books
View GitHub Profile
@geoffreycrofte
geoffreycrofte / dabblet.css
Created June 1, 2012 14:04
Only first letter in uppercase
/*
* Only first letter in uppercase
*/
/* all in lowercase */
.transform li {
text-transform: lowercase;
}
/* first-letter in uppercase */
@geoffreycrofte
geoffreycrofte / dabblet.css
Created June 5, 2012 10:33
Bug fix for Chrome attribute selector
/**
Bug fix for Chrome attribute selector
A @goetter bug report
*/
a {
display: block;
margin-top: 6px;
color: #000;
text-decoration: none;
}
@geoffreycrofte
geoffreycrofte / dabblet.css
Created September 13, 2012 17:13
Feuilles superposées
/**
* Feuilles superposées
*/
/* Petite mise en page */
body {
width: 375px;
margin: 20px auto;
font-family: helvetica, arial, sans-serif;
color: #444;
@geoffreycrofte
geoffreycrofte / dabblet.css
Created September 13, 2012 17:15
"Isometric" shadow
/**
* "Isometric" shadow
*/
div {
position: relative;
width: 250px;
height: 200px;
background: #7799ff;
box-shadow: 10px 10px 0 #3355bb;
@geoffreycrofte
geoffreycrofte / dabblet.css
Created September 24, 2012 15:10
Rating with float right or direction rtl properties
/**
* Rating with float right or direction rtl properties
*/
h1 {
text-align: center;
font-family: Helvetica, Arial;
font-weight: normal;
color: #777;
font-size: 1.3em;
clear: both;
@geoffreycrofte
geoffreycrofte / dabblet.css
Created September 27, 2012 12:00
Rating with float right or direction rtl properties
/**
* Rating with float right or direction rtl properties
*/
h1 {
text-align: center;
font-family: Helvetica, Arial;
font-weight: normal;
color: #777;
font-size: 1.3em;
clear: both;
@geoffreycrofte
geoffreycrofte / functions.php
Last active July 6, 2016 16:20 — forked from stephanie-walter/gist:5014232
Add a Branch shortcode to WordPress
// Adds [branch id="" noscript="branch-url"] shortcode in WordPress
if ( ! function_exists( 'branch_embedded' ) ) {
function branch_embedded( $atts ) {
$atts = shortcode_atts( array( 'id' => '', noscript=> '' ), $atts );
$output = '<script type="text/javascript" src="http://embed-script.branch.com/assets/embed/embed.m.js?body=0" data-branch-embedid="' . esc_attr( $atts['id'] ) . '" ></script>';
@geoffreycrofte
geoffreycrofte / counting-in-css.css
Last active August 8, 2018 08:14
A way to apply styles depending on number of elements
li:only-of-type {
width: 100%;
}
/* if 2 <ul> childs */
li:nth-last-child(2):first-child,
li:nth-last-child(2):first-child ~ li {
width: 50%;
}
@geoffreycrofte
geoffreycrofte / dabblet.css
Created January 28, 2012 12:36
Same effect in mouseover and mouseout
/**
*
* Same effect in mouseover and mouseout
* Different effects in : http://codepen.io/CreativeJuiz/pen/gnIJG
*
*/
div {
width: 90px; height: 90px;
margin: 3em;
@geoffreycrofte
geoffreycrofte / terminal
Created November 28, 2018 13:13
Get a count of lines of code in a Github Repository
$ git ls-files | xargs wc -l