Skip to content

Instantly share code, notes, and snippets.

View aquelito's full-sized avatar

Axel Roche aquelito

  • Craftsman developer
  • France
View GitHub Profile
@aquelito
aquelito / output.css
Created April 16, 2012 13:01
SCSS Compass Font Size - Vertical Rhythm
html {
font: 100%/1.5em "Helvetica Neue", Helvetica, Arial, sans-serif; }
body {
background-image: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(5%, #e1e1e1), color-stop(5%, rgba(225, 225, 225, 0)));
background-image: -webkit-linear-gradient(bottom, #e1e1e1 5%, rgba(225, 225, 225, 0) 5%);
background-image: -moz-linear-gradient(bottom, #e1e1e1 5%, rgba(225, 225, 225, 0) 5%);
background-image: -o-linear-gradient(bottom, #e1e1e1 5%, rgba(225, 225, 225, 0) 5%);
background-image: linear-gradient(bottom, #e1e1e1 5%, rgba(225, 225, 225, 0) 5%);
@aquelito
aquelito / editor_plugin.js
Created October 18, 2012 06:52
WordPress Tiny MCE - Change Language Attributes
/*
* plugin/tinymce/editor_plugin.js
*/
(function(){
tinymce.PluginManager.requireLangPack('languages');
tinymce.create('tinymce.plugins.languages', {
createControl: function(n, cm){
/*var list, listlang = {
'en': 'English',
@aquelito
aquelito / article-BlogPosting.html
Created November 6, 2012 22:11
Page Article Schema - BlogPosting
<!DOCTYPE html>
<html lang="fr" itemscope itemtype="http://schema.org/WebPage">
<head>
<meta charset="UTF-8" />
<title>Titre de l'article</title>
<meta itemprop="name" content="Titre de l'article" />
<meta itemprop="description" content="Coutre description de l'article" />
</head>
<body>
<div id="wrapper">
// Place your settings in the file "User/Preferences.sublime-settings", which
// overrides the settings in here.
//
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.
{
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
// Note that the font_face and font_size are overridden in the platform

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@aquelito
aquelito / other.md
Last active February 9, 2019 22:46
Drupal Snippet
@aquelito
aquelito / git-command.md
Last active February 22, 2024 12:49
GIT - Ligne de commande principale
title category
Git config
Git

Rappel

Ne pas oublier : l'aide en ligne de commande.

@aquelito
aquelito / dataAttributes.php
Created February 20, 2014 15:38
Encodage du tableau JSON passer via data attribute
<?php
// UPDATE::AxelRoche
$var_modal = array(
'id' => $_product->getId(),
'title' => $_product->getName(),
'price' => $_product->getPrice(),
'image' => $_product->getImageUrl(),
'qty' => 1,
);
@aquelito
aquelito / SassMeister-input.scss
Created March 26, 2014 21:09
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
@function array-value($list, $key) {
@each $item in $list {
@if ($key == nth($item, 1)) {
@return nth($item, 2);
@aquelito
aquelito / SassMeister-input-HTML.html
Created April 23, 2014 19:10
Generated by SassMeister.com.
<div class="team__item" itemprop="employee">
<div class="team__inner" itemscope="" itemtype="http://schema.org/Person">
<div class="team__content">
<div class="team__content_back">
<h3 itemprop="name">Name</h3>
<p itemprop="jobTitle">JobTitle</p>
</div>
</div>
</div>