sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable
sudo invoke-rc.d apparmor restart
sudo replace log_slow_queries slow_query_log_file -- /etc/mysql/conf.d/mysqld_slow_log.cnf
sudo bash -c 'echo "slow_query_log = 1" >> /etc/mysql/conf.d/mysqld_slow_log.cnf'
sudo apt-get purge --assume-yes mysql-server mysql-server-5.5 mysql-server-core-5.5 mysql-client mysql-client-5.5 mysql-client-core-5.5
sudo apt-get autoremove --assume-yes
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb [arch=amd64,i386] http://mariadb.mirror.anstey.ca/repo/10.1/ubuntu trusty main'
<?php | |
/** | |
* Plugin Name: NGINX FastCGI cache purge | |
* Version: 0.1 | |
* Description: Flush NGINX FastCGI cache purge | |
* Author: The Shipyard Crew | |
* Author URI: https://theshipyard.se/ | |
* Plugin URI: https://theshipyard.se/ | |
* Text Domain: nginx-fastcgi-cache-purge |
<?php | |
/* | |
Plugin Name: User Registration to Subscription (wpmu) | |
Plugin URI: http://bappi-d-great.com | |
Description: This plugin allows your users to auto subscribe when registered | |
Author: WPMU DEV | |
Version: 1.0.1 | |
Author URI: http://bappi-d-great.com | |
*/ |
<?php | |
session_start(); | |
$user_2p = ''; // your 2parale user | |
$pass_2p = ''; // your 2parale pass | |
function get_page($link) { | |
global $user_2p, $pass_2p; | |
$ch = curl_init($link); |
<?php | |
function recursive_campaigns($api_url, &$campaigns, &$page) { | |
global $url; | |
$response = file_get_contents($api_url); | |
$json_obj = json_decode($response); | |
if( count($json_obj) > 1 ) { | |
foreach($json_obj as $obj) { | |
if( $obj->campaign->default_lead_commission_rate != "" ) { |
module VineHasher | |
VINE_KEY = 'BuzaW7ZmKAqbhMOei5J1nvr6gXHwdpDjITtFUPxQ20E9VY3Ll' | |
VINE_KEY_SIZE = VINE_KEY.size | |
VINE_KEY_HASH = VINE_KEY.split('').each_with_index.inject({}) {|hash, (key, index)| hash[key] = index; hash } | |
def unhash_id(hashed_id) | |
hashed_id.reverse.split('').each_with_index.inject(0) { |total, (key, index)| total + VINE_KEY_HASH[key] * VINE_KEY_SIZE**index } | |
end | |
def hash_id(id) |
<?php | |
$jsonurl = "http://infinigag.eu01.aws.af.cm/"; | |
$json = file_get_contents($jsonurl,0,null,null); | |
$json_output = json_decode($json, TRUE); | |
foreach($json_output['images'] as $key => $thisValue) | |
{ | |
$arrayImage = $thisValue['image']; | |
$title = $thisValue['title']; | |
$url = $thisValue['url']; |
I've been getting a lot of Github notifications lately. Between work at Shopify, development on Zeus, and all the little things in between, my inbox usually has about 50 github notifications in it.
This is a little annoying.
The problem is, I care about most of those notifications the moment they happen, but I don't interact with them as emails -- I go to github as soon as I get the email and deal with it there. Most of my other email, I don't care so much about it immediately, but it's fairly important that I actually read them eventually. What this tends to cause is a flood of unread notification emails drowning out the important stuff, which I end up ignoring if it falls off the first page.
The solution to this problem for me ended up being really trivial (I didn't even have to code anything!)
<?php if (get_adjacent_post(false, '', false)): // if there are newer posts ?> | |
<a href="<?php echo get_permalink(get_adjacent_post(false,'',false)); ?>" class="article-nav prev"> </a> | |
<?php endif; ?> | |
<?php if (get_adjacent_post(false, '', true)): // if there are older posts ?> | |
<a href="<?php echo get_permalink(get_adjacent_post(false,'',true)); ?>" class="article-nav next"> </a> | |
<?php endif; ?> |
<div class="fb-comments"data-href="<?php the_permalink(); ?>" data-num-posts="2" mobile="false"></div> |