Skip to content

Instantly share code, notes, and snippets.

View andrewspear's full-sized avatar

Andrew Spear andrewspear

View GitHub Profile
@Youssef-Mhamdi
Youssef-Mhamdi / WPMUDEV_Smush_Add_Smush_Missing_Table_smush_dir_images.php
Last active May 19, 2021 17:38
Mu Plugin that adds Smush Missing Table to DB to fix the message taht says: Directory smushing requires custom tables and it seems there was an error creating tables. For help, please contact our team on the support forums.
<?php
/**
* Plugin Name: [Smush] - Add smush_dir_images to DB
* Plugin URI: https://premium.wpmudev.org/
* Description: Add Smush Missing Table to DB to fix the message taht says: Directory smushing requires custom tables and it seems there was an error creating tables. For help, please contact our team on the support forums.
* Task: SLS-1383
* Author: Youssef Mhamdi @ WPMUDEV
* Author URI: https://premium.wpmudev.org/forums/profile/mhamdiyoussef/
* License: GPLv2 or later
*/
[test]: Update test/* files
[dist]: Changes to submodules, version bumps, updates to package.json
[minor]: Small changes
[doc]: Updates to documentation
[fix]: Bug fixes
[bin]: Update binary scripts associated with the project
[refactor]: Refactor of existing code
[nit]: Small code review changes mainly around style or syntax
[feat]: New features
@FinlayDaG33k
FinlayDaG33k / gist:23a6134b1ad3e5f867a64219a374406e
Last active February 12, 2024 19:30
Minergate-cli ubuntu installation
Run this command to install MG-CLI:
sudo apt-get update && wget https://minergate.com/download/deb-cli -O minergate-cli.deb && sudo dpkg -i minergate-cli.deb
to start miner (4 cores for BCN) use this command:
minergate-cli -user <YOUR@EMAIL.KAPPA> -bcn 4
Feel free to send some of your earnings to me:
BTC (Don't attempt to send other coins to this address!): 17f77AYHsQbdsB1Q6BbqPahJ8ZrjFLYH2j
@dommmel
dommmel / invite_to_slack.js
Created May 25, 2016 14:40
Zapier Code to auto invite users to slack
var slackTeam = "YOUR_SLACK_TEAM_NAME ";
var token = 'YOUR_ADMIN_TEST_TOKEN';
// A test token will suffice.
// You can generate one at https://api.slack.com/docs/oauth-test-tokens
// Just make sure that the user issuing the test token is an admin.
var url = 'https://'+ slackTeam + '.slack.com/api/users.admin.invite';
fetch(url, {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
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