Skip to content

Instantly share code, notes, and snippets.

View AlexKratky's full-sized avatar
🌴
Working from home

Alex Krátký AlexKratky

🌴
Working from home
View GitHub Profile
@nasrulhazim
nasrulhazim / ci.yml
Created November 20, 2020 15:32
GitHub Action - MySQL Service for Laravel with Multiple Databases
name: Unit Test
on:
push:
branches: [develop]
pull_request:
branches: [master, develop]
jobs:
PHPUnit:
@AlexKratky
AlexKratky / fomatNumberInString.js
Last active February 21, 2021 09:36
Format number with spaces in text using regex
let str = 'This string contains two numbers. One is 50000 and the second one is 10000.';
// Edit (\s|\.) if the character after the number is not whitespace or dot
// Edit '$& ' if you want to insert different character from whitespace, for example to format number using ',' replace whitespace with '$&,'
console.log(str.replace(/\d(?=(\d{3})+(\s|\.))/g, '$& '));
// or
console.log(str.replace(/\B(?=(\d{3})+(?!\d))/g, " "));
@sergomet
sergomet / GoogleDriveServiceProvider.php
Created April 1, 2017 07:01 — forked from ivanvermeyen/!NOTE.md
Setup a Laravel Storage driver with Google Drive API
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
@dylancwood
dylancwood / tree.css
Last active June 23, 2025 06:37
CSS to create a simple tree structure with connecting lines. No images or JS required.
ul.tree, ul.tree ul {
list-style: none;
margin: 0;
padding: 0;
}
ul.tree ul {
margin-left: 10px;
}
ul.tree li {
margin: 0;