Skip to content

Instantly share code, notes, and snippets.

View asjustas's full-sized avatar

Justas asjustas

  • Vilnius, Lietuva
View GitHub Profile
https://gist.github.com/asjustas/bcc1d56f2b5e35ab55f9dde61ee7a142
https://gist.github.com/chadrien/c90927ec2d160ffea9c4#gistcomment-1881975
@asjustas
asjustas / xdebug_settings.ini
Created February 5, 2018 20:26 — forked from drobinson/xdebug_settings.ini
Xdebug settings for debugging using remote hosts and how to debug cli php scripts
zend_extension = /usr/lib/php5/20121212/xdebug.so
[xdebug]
; This is the default, but just to be sure...
xdebug.remote_port = 9000
; Make sure vmhost is set in /etc/hosts as the ip address of your host machine
; from your virtual machine (set in virtual box as the host-only adapter ip)
@asjustas
asjustas / README.md
Created December 7, 2017 13:37 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
[Unit]
Description=Webhook server
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/webhook -hooks=/srv/webhook/hooks.json
Restart=always
[Install]
[Unit]
Description=Docker resolver
After=docker.service
Requires=docker.service
[Service]
ExecStartPre=docker run --rm --privileged --net=host gliderlabs/hostlocal
ExecStart=/usr/bin/docker-resolver
Restart=always
@asjustas
asjustas / Readme.md
Last active March 20, 2016 12:12
Docker on mac
wget https://get.docker.com/builds/Darwin/x86_64/docker-1.10.3
sudo mv docker-1.10.3 /usr/local/bin/docker
sudo chmod +x /usr/local/bin/docker
wget https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m`
sudo mv docker-compose-`uname -s`-`uname -m` /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
<?php
Route::filter('after', function($response)
{
opcache_reset();
});
App::before(function($request)
{
$cachedViewsDirectory=app('path.storage').'/views/';
$files = glob($cachedViewsDirectory.'*');
<?php
global $gCms;
$db = &$gCms->GetDb();
$parent = $params['parent'];
if ((int)$parent < 1) {
echo 'nera parent id';
} else {
.clearfix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
@asjustas
asjustas / gist:8647067
Created January 27, 2014 11:36
Decode HTML entities with jQuery
var decoded = $('<textarea/>').html(encoded).val();