Skip to content

Instantly share code, notes, and snippets.

Avatar

Axel Roche aquelito

View GitHub Profile
@aquelito
aquelito / output.css
Created Apr 16, 2012
SCSS Compass Font Size - Vertical Rhythm
View output.css
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 Oct 18, 2012
WordPress Tiny MCE - Change Language Attributes
View editor_plugin.js
/*
* 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 Nov 6, 2012
Page Article Schema - BlogPosting
View article-BlogPosting.html
<!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">
View Preferences.sublime-settings.json
// 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
View gist:8063540

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 / git-command.md
Last active Feb 26, 2021
GIT - Ligne de commande principale
View git-command.md
title category
Git config
Git

Rappel

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

@aquelito
aquelito / dataAttributes.php
Created Feb 20, 2014
Encodage du tableau JSON passer via data attribute
View dataAttributes.php
<?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 Mar 26, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// 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 Apr 23, 2014
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<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>