Skip to content

Instantly share code, notes, and snippets.

View suvozy's full-sized avatar
🙇‍♂️
··· 🤖

Shubhajit Saha suvozy

🙇‍♂️
··· 🤖
View GitHub Profile

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@suvozy
suvozy / Has weird right-to-left characters.txt
Created March 16, 2020 10:00 — forked from endolith/Has weird right-to-left characters.txt
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@suvozy
suvozy / tonegen.py
Last active December 4, 2016 20:49 — forked from brdrcol/tonegen.py
Play sinusoids with pygame/numpy
import pygame
import numpy as np
from pprint import pprint
import time
import math
notes = {
'g3':196.00,
'gs3':207.65,
'a3':220.00,
@suvozy
suvozy / ratio.css
Last active August 29, 2015 14:17 — forked from agriboz/ratio.css
img{
min-width: 100%;
height: auto;
}
.content{
position: absolute;
top: 0;
left: 0;
bottom: 0;

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

<?php
/*
* Because we are removing the ending `=` padding we will have a string length of
* md5 <= 24
* sha1 <= 28
*
* Probably should just remove the code that trims the equal sign since it's kind of pointless....
*/