PhpStorm Tips, ticks and standard setup
- Tips and Tracks for PHPStorm (PHPStorm Tips and Tricks.md)
- Standard setup for PHP projects (Standard.md)
// resources/js/services/Form.js | |
import FormErrors from './FormErrors' | |
export default class { | |
constructor (initialData = {}, submitCallback = null) { | |
this._initialData = initialData | |
this._submitCallback = submitCallback | |
this.errors = new FormErrors() |
<?php | |
/** | |
* Insert a value or key/value pair after a specific key in an array. If key doesn't exist, value is appended | |
* to the end of the array. | |
* | |
* @param array $array | |
* @param string $key | |
* @param array $new | |
* |
// create a bookmark and use this code as the URL, you can now toggle the css on/off | |
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
javascript: (function() { | |
var elements = document.body.getElementsByTagName('*'); | |
var items = []; | |
for (var i = 0; i < elements.length; i++) { | |
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
items.push(elements[i]); | |
} | |
} |
<?php | |
// Buffer all upcoming output... | |
ob_start(); | |
// Send your response. | |
echo "Testing response"; | |
// Get the size of the output. | |
$size = ob_get_length(); |
public function request_queue_handler(Request $request) | |
{ | |
header($_SERVER['SERVER_PROTOCOL'].' 200 OK'); | |
$amo_subdomain = $_POST['account']['subdomain']; | |
$path_structure = '../'.$amo_subdomain.'/queue_files'; | |
$queue_file_prefix = $path_structure.'/queue_file_'; | |
$queue_flag_file = $path_structure.'/queue_flag'; | |
$lead_name = $_POST['leads']['add'][0]['name']; |
<?php | |
// Buffer all upcoming output... | |
ob_start(); | |
// Send your response. | |
echo "Testing response"; | |
// Get the size of the output. | |
$size = ob_get_length(); |
@php | |
$d = $d ?? null; // default value | |
@endphp | |
<div class="form-group row"> | |
<label for="{{ $n }}" class="col-sm-4 col-form-label text-md-right"><b>{{ $l }}</b></label> | |
<div class="col-md-8"> | |
<input id="{{ $n }}" type="checkbox" class="form-control" name="{{ $n }}" value="1" @if(old($n, $d) == '1') checked @endif> | |
@if ($errors->has($n)) | |
<small class="text-danger">{{ $errors->first($n) }}</small> |
This is a primer for installing a Letsencrypt certificate on a Jira server that is running the Jira provided, default Tomcat for serving webpages.
I found lots of information about how to do it using a free-standing Tomcat or nginx, but nothing about this particular combination. I hope it helps you!
Obviously, in all the examples, you need to replace jira.example.com
with your own domain! And (duh) you need to use your own password, not 1234
You need to have installed Java (outside the scope of this document). Then in your user's shell RC file and probably root
's RC file, add