Skip to content

Instantly share code, notes, and snippets.

View Faks's full-sized avatar
🐎
Still horsing around.

Oskars Germovs Faks

🐎
Still horsing around.
View GitHub Profile
@prologic
prologic / LearnGoIn5mins.md
Last active July 3, 2024 04:05
Learn Go in ~5mins
@skripal
skripal / phpstorm trial reset
Created October 4, 2020 16:36 — forked from manidip/phpstorm trial reset
phpstorm trial reset
cd ~/.PhpStorm[version]
rm config/eval/PhpStorm[version].evaluation.key
rm config/options/options.xml
cd ~/.java/.userPrefs/jetbrains
rm -rf phpstorm
@pishangujeniya
pishangujeniya / reset-mysql-8-root-password-windows.md
Created December 5, 2019 18:04
Reset MySQL 8.0 root Password in Windows

Reset MySQL 8.0 root Password in Windows

  1. Stop the MySQL 8.0service from services
  2. Go to path C:\Program Files\MySQL\MySQL Server 8.0\bin and open cmd
  3. Run mysqld --console --skip-grant-tables --shared-memory
  4. Open new cmd in the same path
  5. Run following commands
  6. mysql -u root
  7. select authentication_string,host from mysql.user where user='root';
  8. UPDATE mysql.user SET authentication_string='' WHERE user='root';
@marcmascort
marcmascort / .phpcs.xml
Last active June 30, 2020 11:29
phpcs compatible to phpinsights
<ruleset name="PHP_Codeer" xsi:noNamespaceSchemaLocation="phpcs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<description>The coding standard for PHP_Codeer itself.</description>
<!-- Files -->
<file>bin</file>
<file>src</file>
<!-- Excludes -->
<exclude-pattern>vendor/</exclude-pattern>
@Faks
Faks / sqlsrv-php7.2.sh
Created April 1, 2019 18:00 — forked from LegitDongo/sqlsrv-php.sh
SQLSRV PHP 7.2 Drivers that work for Laravel Homestead
# Best if added to `after.sh` so that this gets run every time the box is provisioned
# composer won't be able to download updates with an active proxy, and will hang trying to get the newest file
# You may want to comment this out based on your network configuration
sudo bash -c 'echo "export NO_PROXY=*" >> ~/.profile'
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update
sudo apt-get install php7.2-dev php7.2-xml mcrypt php-pear php-mbstring unixodbc unixodbc-dev -y --allow-unauthenticated
@reinink
reinink / app.js
Created November 2, 2018 12:56
Auto register Vue components
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
window.Vue = require('vue');
@barryvdh
barryvdh / deploy.php
Last active September 7, 2018 03:01 — forked from jakebathman/logslaravel.sh
Tail Laravel logs and filter out the stack traces using https://deployer.org/
desc('Tail your laravel.log file');
task('tail', function () {
$numLines = isVerbose() ? '100' : '1000';
$tail = "tail -n {$numLines} {{deploy_path}}/current/storage/logs/laravel*.log ";
if (!isVerbose()) {
// Change -P to -E, depending on OS or grep version.
$tail .= '| grep -i -P "^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" | tail -n 100 ';
}
$output = run($tail);
@miadz
miadz / MigrateSpecificCommand.php
Created October 27, 2017 14:24 — forked from rohitkhatri/MigrateSpecificCommand.php
Migrate specific migrations with this command
<?php
/* Instructions:
* 1. Add this class file to your app/Console folder
* 2. Register command in app/Console/Kernel by adding `\App\Console\Commands\MigrateSpecificCommand::class` it to commands array
* 3. Done, now you can access it like: php artisan migrate:specific 2014_10_12_000000_create_users_table,2014_10_12_100000_create_password_resets_table
*/
namespace App\Console\Commands;
@rohitkhatri
rohitkhatri / MigrateSpecificCommand.php
Last active December 12, 2022 23:10
Migrate specific migrations with this command
<?php
/* Instructions:
* 1. Add this class file to your app/Console folder
* 2. Register command in app/Console/Kernel by adding `\App\Console\Commands\MigrateSpecificCommand::class` it to commands array
* 3. Done, now you can access it like: php artisan migrate:specific 2014_10_12_000000_create_users_table,2014_10_12_100000_create_password_resets_table
*/
namespace App\Console\Commands;
@RowlandOti
RowlandOti / global.php
Last active April 15, 2018 10:12
Laravel 4.2 Example of how to log errors and exceptions
<?php
/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.