This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Network Latest Posts v3.x | |
* | |
* Copyright 2016 Jose SAYAGO | |
* Licensed under the GPL v2.0 | |
* http://www.gnu.org/licenses/gpl-2.0.html | |
* | |
*/ | |
/* | |
* Main Wrapper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Network Latest Posts v3.0 | |
* | |
* Copyright 2012 L'Elite | |
* Licensed under the GPL v2.0 | |
* http://www.gnu.org/licenses/gpl-2.0.html | |
* | |
* Great and ugly things aren't as good | |
* as great and beautiful things ;) | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Single Latest Posts v1.0 | |
* | |
* Copyright 2007 - 2013 L'Elite | |
* Licensed under the GPL v2.0 | |
* http://www.gnu.org/licenses/gpl-2.0.html | |
* | |
* Great and ugly things aren't as good | |
* as great and beautiful things ;) | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* file_get_contents | |
*/ | |
// Get User ID from FB SDK, this example uses Facebook PHP SDK v4 | |
$fb_userID = $fb_data['me']['id']; | |
$fb_graph = 'https://graph.facebook.com/'.$fb_userID; | |
$fb_request = file_get_contents($fb_graph); // Replace with curl_get_contents if this does not work | |
$fb_response = json_decode($fb_request); | |
// Print username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Single Latest Posts v1.7.3 | |
* | |
* Copyright 2007 - 2015 L'Elite | |
* Licensed under the GPL v2.0 | |
* http://www.gnu.org/licenses/gpl-2.0.html | |
* | |
*/ | |
/*\ | |
* ========================= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Network Latest Posts v3.0 | |
* | |
* Copyright 2012 L'Elite | |
* Licensed under the GPL v2.0 | |
* http://www.gnu.org/licenses/gpl-2.0.html | |
* | |
* Great and ugly things aren't as good | |
* as great and beautiful things ;) | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _dynamicScale( params ) { | |
gutter = 200; | |
initialScale = params.zoom; | |
initialWidth = jQuery('#canvasEditor').innerWidth(); | |
initialHeight = jQuery('#canvasEditor').innerHeight(); | |
width = initialWidth / initialHeight * ( jQuery(window.top).innerHeight() - gutter ); | |
height = jQuery(window.top).innerHeight() - gutter; | |
xScale = ( width / initialWidth ) * initialScale.x; | |
yScale = ( height / initialHeight ) * initialScale.y; | |
scale = { x: xScale, y: yScale }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Network Latest Posts Shortcode Form | |
Version 3.5 | |
Author L'Elite | |
Author URI http://laelite.info/ | |
*/ | |
/* Copyright 2012 L'Elite (email : [email protected]) | |
This program is free software; you can redistribute it and/or modify |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a Cronjob | |
~ $ crontab -e | |
# Cron Editor | |
# Run every minute | |
* * * * * /path/to/phpcgi-watcher.sh | |
# Clean up logfile every hour (optional) | |
*/60 * * * * echo '' > /var/log/phpcgi-watcher.log | |
:wq | |
# Check the cronjob was successfuly created | |
~ $ crontab -l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# @author Jose SAYAGO | |
# @uri http://josesayago.com/blog/ | |
# | |
# Process to monitor how many PHP-CGI processes are running, and kill them | |
# if they exceed the limit | |
# | |
# Set the maximum number of CGI Processes allowed | |
MAX_CGI=25; |
NewerOlder