Skip to content

Instantly share code, notes, and snippets.

View brcontainer's full-sized avatar
👽
Try Inphinit PHP framework today!

Guilherme Nascimento brcontainer

👽
Try Inphinit PHP framework today!
View GitHub Profile
@brcontainer
brcontainer / current-path.sh
Created August 1, 2016 23:46
Obtain the path of the script and the way in which he was called (has not been tested yet, it is just to study)
#!/usr/bin/env bash
SCRIPT_PATH=$(realpath "$0")
CALLING_FROM=$(pwd)
if [ -d "$CALLING_FROM" ]; then
CALLING_DIR=$CALLING_FROM
else
CALLING_DIR=$(dirname "$CALLING_FROM")
fi

Getting start

Install Whoops (prefer version 2)

cd projectfolder
composer require filp/whoops

Or edite composer.json and set require values, like this:

Laravel 5 in Windows IIS

  1. Create a web.config file in laravel root diretory
  2. Put this content in web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <defaultDocument>
@brcontainer
brcontainer / laravel-windows-server-iis.md
Created March 13, 2016 03:02 — forked from leabdalla/laravel-windows-server-iis.md
How to use Laravel in Windows IIS

Laravel 4 in Windows Server IIS

###1. Put this web.config in laravel root diretory

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
		<defaultDocument>
 
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@brcontainer
brcontainer / inject-script-in-qwebframe.cpp
Last active March 13, 2016 03:06
Inject script in QWebFrame
QObject::connect(ui->webView, SIGNAL(loadFinished(bool)), this, SLOT(loadedWebView(bool)));
...
void Form::loadedWebView(const bool a) {
Q_UNUSED(a);
QString scriptContent = "function TEST() { alert(1); }";
QString injectionJS = "(function() { var newdom = document.createElement('script');";