Skip to content

Instantly share code, notes, and snippets.

View nevercodealone's full-sized avatar

Never Code Alone nevercodealone

View GitHub Profile
version: '3.7'
services:
redis:
image: arm64v8/redis:latest
elasticsearch:
image: arm64v8/elasticsearch:7.17.10
shop:
environment:
- DATA_PROVISION=1
@nevercodealone
nevercodealone / python-print-format
Created January 28, 2022 15:28
Well formatted output for locust text response in python
import json
....
parsed = json.loads(response.text)
print(json.dumps(parsed, indent=4, sort_keys=True))
@nevercodealone
nevercodealone / nginx-site.conf
Created January 16, 2021 10:21
Nginx DDEV config for Sulu CMS
# ddev nginx-site.conf for Sulu CMS
# Set https to 'on' if x-forwarded-proto is https
map $http_x_forwarded_proto $fcgi_https {
default off;
https on;
}
server {
<?php namespace NCATesting\service;
use App\Service\YouTubeService;
use Codeception\Stub;
use NCATesting\UnitTester;
use Mockery as m;
class YouTubeServiceCest
{
private $fixture;
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=apache # <-- wordpress owner
WP_GROUP=apache # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@nevercodealone
nevercodealone / .gitignore_global
Created November 2, 2017 15:42
Global gitignore file
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
@nevercodealone
nevercodealone / .zshrc
Last active October 23, 2017 20:55
oh-my-zsh zshrc Never Code Alone
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="agnoster"
# Example aliases
@nevercodealone
nevercodealone / gist:175b96e565cb97fe16ec690d0b72245c
Last active March 5, 2018 16:13
Codeception Xdebug CLI export var mac for PhpStorm
export XDEBUG_CONFIG="remote_enable=1 remote_mode=req remote_port=9000 remote_host=localhost remote_connect_back=0 idekey=PHPSTORM"
@nevercodealone
nevercodealone / TYPO3 last query snippert for PhpStorm Live-Templates
Last active March 21, 2017 10:05
Get the last sql query from TYPO3. You can use it easy as live template and set a break point in xdebug to get the query in the var $lastQuery
$GLOBALS['TYPO3_DB']->store_lastBuiltQuery = 1;
$lastQuery = $GLOBALS['TYPO3_DB']->debug_lastBuiltQuery;
@nevercodealone
nevercodealone / PhpStorm Live Templates variable names
Created March 20, 2017 11:37
Set variable name in PhpStorm live templates
/**
* $attribute$
*
* @var string
*/
protected $$$attribute$ = '';