Skip to content

Instantly share code, notes, and snippets.

View bbrochier's full-sized avatar
:octocat:
Happy coder !

Benniboom bbrochier

:octocat:
Happy coder !
View GitHub Profile
@bbrochier
bbrochier / ajax-call.js
Last active August 29, 2015 14:07
Ajax call
var jqxhr =
$.ajax({
url:"ajax.php",
data: //json, xml, text...
})
.done(function(data){
console.log(data); //response from ajax.php
})
.fail(function() {
console.log( "ajax error" );
@bbrochier
bbrochier / antialiased.css
Created October 13, 2014 13:39
Fix for fonts faces being bold on chrome/moz
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@bbrochier
bbrochier / footer.html
Last active August 29, 2015 14:07
Footer sticky reveal
@bbrochier
bbrochier / sharing-button.html
Last active March 3, 2016 16:42
facebook, twitter, google+ sharing buttons
TWITTER
To convert your text into URI: http://www.url-encode-decode.com/
<a class="share-on-link share-on-twitter" href="https://twitter.com/intent/tweet?text=Quick Thoughts on Sharing Buttons&amp;url=http://css-tricks.com/quick-thoughts-on-sharing-buttons/&amp;via=real_css_tricks">Twitter</a>
FACEBOOK
<a class="share-on-link share-on-facebook" href="https://www.facebook.com/sharer/sharer.php?u=http://css-tricks.com/quick-thoughts-on-sharing-buttons/">Facebook</a>
GOOGLE+
<a class="share-on-link share-on-googleplus" href="https://plus.google.com/share?url=http://css-tricks.com/quick-thoughts-on-sharing-buttons/">Google+</a>
(function($){
'use strict';
//some code
})(jQuery);
@bbrochier
bbrochier / social-feeds.html
Last active February 6, 2017 08:12
Social Feeds
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Social Data</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/screen.css">
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
@bbrochier
bbrochier / local-storage-db.js
Created September 11, 2014 16:17
Local Storage DB
var testObject = { 'one': 1, 'two': 2, 'three': 3 };
// Put the object into storage
localStorage.setItem('testObject', JSON.stringify(testObject));
// Retrieve the object from storage
var retrievedObject = localStorage.getItem('testObject');
console.log('retrievedObject: ', JSON.parse(retrievedObject));
#foo:checked::before,
input[type="radio"] {
position:absolute;
clip: rect(0,0,0,0);
clip: rect(0 0 0 0);
}
#foo:checked,
input[type="radio"] + label::before {
content: '';
display: inline-block;