Skip to content

Instantly share code, notes, and snippets.

View byjpr's full-sized avatar

Jordan P.R. byjpr

  • Shires, UK
View GitHub Profile
@byjpr
byjpr / PortalLocations.md
Created September 6, 2019 09:53
Launch Engineering Minecraft

Jungle portal Surface: 7535, 93, -420 Nether: 927, 91, -58

@admin farm Surface: -177, 69, 70

@byjpr
byjpr / useful.zsh
Created August 31, 2017 13:06
Useful MacOS Commands
# Check the current status of System Integrity Protection (SIP)
csrutil status
# Reset Permissions on MacOS Sierra the same way you used to with previous versions of OS X.
# You may need to disable SIP before this works. I suggest re-enabling SIP afterwards.
diskutil resetUserPermissions / `id -u`
# Returns file/directory permissions formatted as number values resembling those you would use with chmod
stat -f '%A %N' *
@byjpr
byjpr / gist:2a23a1c53d3c5adf57a4b38427b0c55c
Created October 7, 2016 10:32 — forked from jonathanmoore/gist:2640302
Get the share counts from various APIs

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