Skip to content

Instantly share code, notes, and snippets.

View Antoinebr's full-sized avatar
:octocat:
🔥

Antoinebr

:octocat:
🔥
  • Fastly
  • Rennes
View GitHub Profile
@Antoinebr
Antoinebr / hubspot-hubl.html
Created October 11, 2021 20:18 — forked from johnsfuller/hubspot-hubl.html
WordPress/PHP & HubSpot/HubL Comparison Cheat Sheet
<!-- 👇 Scroll down 👇 -->
{# variables #}
{% set my_variable = 'Hello world' %}
{# get variables from somewhere else #}
{% import 'path/to/hubl-variables.html' as site_vars %}
{{ site_vars.my_external_variable }}
@Antoinebr
Antoinebr / gist:2f2a0327479850d1077396d4c03a2018
Last active April 26, 2022 21:42 — forked from chrisle/gist:2252209
CURL as GoogleBot 2.1
curl --user-agent "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.1 Mobile Safari/537.36 (compatible);" -v $@

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

@Antoinebr
Antoinebr / antoine-config.rb
Last active August 29, 2015 14:15 — forked from nathansmith/config.rb
Fichier de configuration Compass
require 'compass/import-once/activate'
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "/" # pour un otpout à la racine du projet
sass_dir = "sass" # pour un input dans le dossier sass
relative_assets = true # pour éviter les prb avec les sprites
images_dir = "images" # le nom du fichier image
javascripts_dir = "javascripts"
@Antoinebr
Antoinebr / README.md
Last active August 29, 2015 14:15 — forked from hofmannsven/README.md
@Antoinebr
Antoinebr / default.vcl
Last active August 29, 2015 14:15 — forked from reifman/default.vcl
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 60s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.max_connections = 800;
}
@Antoinebr
Antoinebr / varnish
Last active August 29, 2015 14:15 — forked from reifman/varnish
# Configuration file for varnish
#
# /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK
# to be set from this shell script fragment.
#
# Should we start varnishd at boot? Set to "no" to disable.
START=yes
# Maximum number of open files (for ulimit -n)