Skip to content

Instantly share code, notes, and snippets.

View brunobc182's full-sized avatar
🏠
Working from home

Bruno Chagas brunobc182

🏠
Working from home
View GitHub Profile
@jourdanrodrigues
jourdanrodrigues / slate_diff.py
Last active June 1, 2020 14:43
Diff algorithm for comparison between 2 SlateJS content objects
from typing import List, Iterable, Mapping
from diff_match_patch import DiffMatchPatch # https://github.com/google/diff-match-patch/blob/master/python3/diff_match_patch.py
def _index_or_none(items: list, index: int):
try:
return items[index]
except IndexError:
return None
@apisandipas
apisandipas / share-urls.md
Last active March 18, 2024 08:19 — forked from chrisjlee/drupal-views-share-global-text-field
Share url's for Facebook, Twitter, Pinterest and Linkedin with just get variables

Creating share buttons with just URL's

Twitter

http://twitter.com/share?text=<TITLE>&url=<URL>

E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com

Facebook

http://www.facebook.com/sharer.php?u=&amp;p[title]=