Skip to content

Instantly share code, notes, and snippets.

@regenrek
regenrek / BitbucketServerApi.php
Last active July 28, 2017 13:05
BitbucketServerApi
<?php
/**
* This is an extension Class which works with Bitbucket Server.
* See here https://github.com/YahnisElsts/plugin-update-checker/issues/119#issuecomment-318436920
*/
if ( !class_exists('BitbucketServerApi', false) ):
class BitbucketServerApi extends Puc_v4p2_Vcs_Api {
@regenrek
regenrek / gist:e79dea9e000457b409e9dd3f7df4e33c
Created August 12, 2016 13:27
Wordpress Easy Inline Image Resize
# install https://github.com/regenrek/WP-Aqua-Resizer Wordpress plugin
$att_id = get_post_thumbnail_id(get_the_ID());
$image = aq_resize(wp_get_attachment_url( $att_id ), 400, 400,true, false); ?>
<img src="<?php echo $image[0]; ?>" alt="img" />
#php_flag display_startup_errors on
#php_flag display_errors on
#php_flag html_errors on
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
location ~ .(scripts|styles|images|views)/(.*)/(.*)$ {
try_files $uri $uri/ /../frontend/app/$1/$2/$3;
}
location ~ .(scripts|styles|images|views)/(.*)$ {
try_files $uri $uri/ /../frontend/app/$1/$2;
}
location ~ .(bower_components)/(.*)/(.*)$ {