Skip to content

Instantly share code, notes, and snippets.

View Daviid-P's full-sized avatar

David Daviid-P

  • Barcelona
View GitHub Profile
@Daviid-P
Daviid-P / phpcbf.bat
Created April 23, 2024 08:14
bat file to run with pucelle's RunOnSave VSCode extension
@echo off
REM Set a temporary file to store the output
set outputFile=%TEMP%\phpcbf_output.txt
REM Run phpcbf command and redirect output to the temporary file
C:\xampp7\php\php.exe "C:\Program Files\PHP_Tools\phpcbf" %* > "%outputFile%"
REM Store the exit code of phpcbf
set exitCode=%ERRORLEVEL%
@Daviid-P
Daviid-P / launch.json
Created September 28, 2022 10:40
VSCode php xdebug extension config
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
@Daviid-P
Daviid-P / php.ini
Created September 28, 2022 10:39
PHP xDebug VScode
[XDebug]
zend_extension = "C:\xampp7\php\ext\php_xdebug.dll"
xdebug.stopOnEntry = true
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = Off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.show_local_vars=0
xdebug.remote_handler = "dbgp"
xdebug.remote_cookie_expire_time = 36000
xdebug.output_dir = "C:\xampp7\tmp"
@Daviid-P
Daviid-P / Microsoft.PowerShell_profile.ps1
Last active June 23, 2024 15:54
Powershell Profile
Function My-History {
[CmdletBinding()]
param()
cat $env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt
}
Remove-Item 'Alias:\history' -Force
New-Alias -Name 'history' -Value 'My-History' -Scope Global
New-Alias -Name 'grep' -Value 'Select-String' -Scope Global
@Daviid-P
Daviid-P / starship.toml
Last active September 23, 2022 10:01
Prompt for Starship
# ~/.config/starship.toml
command_timeout = 2000
[character]
success_symbol = "[λ](green)"
error_symbol = "[λ](red)"
[username]
style_user = "green bold"