This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
require_once('lib.php'); | |
/** | |
* So you can check with javascript something like | |
* if (data.type == 'error') // Hasn't worked | |
* if (data.type == 'success') // Work with data.value (this will be person) | |
*/ | |
$response = ['type' => 'error']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Something { | |
public function myMethod($someVar, $anotherVar, Organisation $organisation) { | |
return redirect()->route('my.route', ['organisation' => $organisation->slug]); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var page = require('webpage').create(), | |
fs = require('fs'), | |
url = 'http://www.ninemsn.com.au/'; | |
page.onResourceRequested = function(requestData, request) { | |
if (requestData['url'] !== url) { | |
console.log('Aborting ' + requestData['url']); | |
request.abort(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$hc_subdomain = 'my-subdomain'; | |
$room = '12345'; | |
$room_token = 'the-room-token'; | |
if (!empty($_REQUEST['message'])) { | |
$message = json_decode($_REQUEST['message']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: download certbot file | |
get_url: url=https://dl.eff.org/certbot-auto dest=/usr/local/sbin/certbot-auto owner=root group=root mode=0744 validate_certs=no | |
- name: install OS dependencies | |
shell: certbot-auto --os-packages-only --non-interactive | |
- include: ssl.yml | |
with_items: "{{ nginx_vhosts }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
//"os" | |
"io/ioutil" | |
// "gopkg.in/src-d/go-git.v4" | |
"gopkg.in/yaml.v2" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Contracts\Config\Repository; | |
use Illuminate\Http\Request; | |
class ValidProxies | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
/* | |
* Set trusted proxy IP addresses. | |
* | |
* Both IPv4 and IPv6 addresses are | |
* supported, along with CIDR notation. | |
* | |
* The "*" character is syntactic sugar | |
* within TrustedProxy to trust any proxy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PostgresLog implements \Iterator | |
{ | |
protected $fileHandle; | |
protected $line; | |
protected $i; |