Skip to content

Instantly share code, notes, and snippets.

View pabloroman's full-sized avatar

Pablo Román pabloroman

View GitHub Profile
@pabloroman
pabloroman / gist:5611769
Created May 20, 2013 11:42
Varnishtop -i TxURL
1.49 TxURL /wp-admin/post.php?post=621963&action=edit&message=10
1.48 TxURL /?p=621963&preview=true
1.13 TxURL /?s=%22datadog%22
1.09 TxURL /2009/01/08/how-to-snap-up-that-twitter-username-youve-always-wanted/
1.00 TxURL /wp-content/blogs.dir/1/files/2012/02/Screen-Shot-2012-02-02-at-9.57.39-AM-594x245.png
1.00 TxURL /wp-content/blogs.dir/1/files/2012/08/youtube-520x245@2x.jpg
1.00 TxURL /apps/2011/09/07/the-5-best-blogging-platforms-you-havent-heard-of/
1.00 TxURL /wp-content/blogs.dir/1/files/2013/05/2013-05-19_10h02_57-520x245@2x.jpg
1.00 TxURL /wp-content/blogs.dir/1/files/2011/12/Altodot-The-Fan-Machine-founders-657x245.jpg
1.00 TxURL /wp-content/blogs.dir/1/files/2011/12/Anton-Chalbaud-300x200.jpg
@pabloroman
pabloroman / gist:6068508
Last active December 20, 2015 04:09
Cronjobs para politweets.es
* * * * * php /var/www/politweets.es/private/stream/process_stream.php >> /dev/null 2>&1
*/5 * * * * php /var/www/politweets.es/private/stream/monitor_stream.php >> /dev/null 2>&1
50 * * * * php /var/www/politweets.es/private/scripts/beanstalk/stats_updater.fill.php >> /dev/null 2>&1
* * * * * php /var/www/politweets.es/private/scripts/beanstalk/stats_updater.process.php >> /dev/null 2>&1
15 * * * * find /var/www/dev.politweets.es/private/cache/es/sql -mmin +720 -delete
15 * * * * find /var/www/politweets.es/private/cache/es/sql -mmin +720 -delete
20 * * * * find /var/www/dev.politweets.es/private/cache/es/html -mmin +720 -delete
20 * * * * find /var/www/politweets.es/private/cache/es/html -mmin +720 -delete
@pabloroman
pabloroman / gist:7308541
Created November 4, 2013 20:14
Disqus callback
public function action_disqus() {
$input = Input::all();
if ( isset( $input['error'] ) ) {
die( $input['error'] );
}
if( isset( $input['verify'] ) ) {
$code = $input['code']; // A temporary token which you will exchange for a finalized access token.

Ticket 1111

We'd like to add a page to view user profiles. Users can view only their own profiles but an admin can see anyone's profile.

A user can also update their profile, they are allowed to change their display name and phone number. Afterwards their updated profile should be shown.

For compliance reasons, we need to log when a user views their own profile. We don't want to log views by admins.

Just for clarity's sake, it would be nice if we could highlight on the page if the user is an admin.