Skip to content

Instantly share code, notes, and snippets.

[
{ "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+u"], "command": "soft_undo" },
{ "keys": ["f6"], "command": "expand_fqcn" },
{ "keys": ["shift+f6"], "command": "expand_fqcn", "args": {"leading_separator": true} },
{ "keys": ["f5"], "command": "find_use" },
{ "keys": ["f4"], "command": "import_namespace" },
{ "keys": ["f7"], "command": "insert_php_constructor_property" },
{ "keys": ["shift+f12"], "command": "goto_definition_scope" },
<?php
$countries =
array(
"AF" => "Afghanistan",
"AL" => "Albania",
"DZ" => "Algeria",
"AS" => "American Samoa",
"AD" => "Andorra",
"AO" => "Angola",
@jeremynikolic
jeremynikolic / mysqldump - backup
Last active October 13, 2020 19:46
Commands to backup all databases except excluded ones into a current date folder. Restore allows to restore backups from specific date.
#!/bin/bash
declare -a exclude=(information_schema mysql performance_schema sys default)
echo Mysql user ?
read user
echo Mysql password ?
read password
declare folder=$(date +%Y%m%d)
/**
* This is a function that helps naming migrations published by packages
* it will generate YYYY_mm_dd_######_migration_name.php
* if the migration has already been published, it will return the published migration name to prevent dupplicate
*
* @param \Illuminate\Filesystem\Filesystem $filesystem
* @param $migrationName the migration file base name without timestamp or .stub e.g. create_user_table.php
* @param $i allows for incrementing in a way that the migrations order is kept
*
* @return string
@jeremynikolic
jeremynikolic / docker-compose.yml
Created October 25, 2022 20:24
Laravel + Vite + Laradock (Windows host) [October 2022]
...
workspace:
...
ports:
...
- "${WORKSPACE_VITE_PORT:5173}:5173"