Skip to content

Instantly share code, notes, and snippets.

View zahra-ove's full-sized avatar

zahra oveyedzade zahra-ove

View GitHub Profile
  1. in css for an image, if set border-radius half of width of image, then image get rounded. e.g:
  img {
      width: 200px;
      border-radius: 100px;
  }
  1. installing typescript:
  • install node
  • npm i -g typescript
  1. write your typescript code and then you should compile your typescript code to javascript by using: tsc index.ts.

I assumed that our target file name is: index.ts also note that all typescript files extension is: ts

  1. how to create a configuration file for typescript compiler:
@mmartinjoo
mmartinjoo / devops-with-laravel-toc.md
Last active June 4, 2025 01:32
DevOps with Laravel Table of Contents

Topics coming in the next edition:

  • ✅ Load balancers from scratch (published on 10th of October)
  • ✅ Terraform (published on 12th of November)
  • HELM

Fundamentals - 208 pages (Basic package)

Building a pipeline

nginx

  • Serving static content
  • CGI, FastCGI, php-fpm
@dkesberg
dkesberg / eager-load-specific-cloumns-in-eloquent.md
Last active August 11, 2022 19:22
Eager loading specific columns in a nested relationship

Eager loading specific columns in a nested relationship

For eager loading a nested relationship you always have to include the primary key or the foreign key to the field list.

Wrong

$posts = Posts::with(['comments:id,title', 'comments.author:id,email']);

Right

@ziadoz
ziadoz / php80_attributes.php
Last active June 16, 2024 08:19
Using PHP 8.0 Attributes/Annotations To Decorate Functions
<?php
// Attributes (AKA Annotations).
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_FUNCTION)]
class CharDecoratorAttribute
{
public function __construct(protected string $char) // Constructor Property Promotion
{
}
public function decorate(Closure $fn): Closure
@Potherca
Potherca / README.md
Last active June 5, 2024 07:46
Use `array_walk` instead of `foreach`.md -- Potherca's rules for creating more robust code in PHP
@hootlex
hootlex / laravellocal.md
Last active July 3, 2025 21:23
Run laravel project locally

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci