Skip to content

Instantly share code, notes, and snippets.

@santarinto
santarinto / unfiled.js
Created June 15, 2016 13:47
function to parse hash
function hashParse(url) {
function assign(obj, prop, value) {
prop = prop.split(".");
if (prop.length > 1) {
var e = prop.shift();
assign(obj[e] = Object.prototype.toString.call(obj[e]) === "[object Object]" ? obj[e] : {},
prop,
value);
} else
@santarinto
santarinto / show_all_errors_ini_php.php
Created July 13, 2016 16:16
Show all errors in PHP 5 - 7
error_reporting(E_ALL);
ini_set('display_errors', 1);
# /* [ <!-- */ include <stdio.h> /* \
#`{{coding=utf-8\
"true" if 0 != 0 and q != """0" ; ` \
\
if [ -n "$ZSH_VERSION" ]; then \
\
echo exec echo I\'m a zsh script.; \
\
elif [ -n "$BASH_VERSION" ]; then \
\
#!/bin/bash
cd ./docker
docker-compose logs -f
@santarinto
santarinto / run-docker.bash
Created February 22, 2019 10:14
#docker help script
#!/bin/bash
cd ./docker
docker-compose up -d
nginx_ip=`docker-compose exec nginx hostname -I`
nginx_host=`docker-compose exec nginx hostname`
./../manage-etc-hosts.bash add $nginx_host $nginx_ip
echo "app ip: ${nginx_ip}"
echo "app host: ${nginx_host}"
echo "Docker is runing in backgroung, to start show logs, run ./logs-docker.bash"
@santarinto
santarinto / stop-docker.bash
Created February 22, 2019 10:14
#docker help script
#!/bin/bash
cd ./docker
nginx_ip=`docker-compose exec nginx hostname -I`
nginx_host=`docker-compose exec nginx hostname`
./../manage-etc-hosts.bash remove $nginx_host
docker-compose stop
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
textarea {
width: 100%;
xdebug.remote_enable=on
xdebug.remote_host=host.docker.internal
xdebug.remote_port=5902
xdebug.default_enable=1
xdebug.cli_color=1
@santarinto
santarinto / 30-xdebug.ini
Created August 1, 2019 14:07
30-xdebug.ini (cli)
xdebug.remote_enable=on
xdebug.remote_host=host.docker.internal
xdebug.remote_port=5902
xdebug.default_enable=1
xdebug.cli_color=1
xdebug.remote_autostart=1
@santarinto
santarinto / phpStormClearCodeceptionReports.js
Created August 19, 2019 07:22
Jetbrains PhpStorm clear codeception reports tool js
function ReportTool () {}
ReportTool.prototype.removeAllSuccessParts = () => {
const sList = document.getElementById('status_list');
Array.prototype.forEach.call(sList.childNodes, (c) => {
if (c.tagName !== 'LI') return;
if (!c.classList.contains('failed')) sList.removeChild(c);
});
}