Skip to content

Instantly share code, notes, and snippets.

View Katsaros's full-sized avatar
💭
Make it work, make it right, make it fast.

Giannis Katsaros Katsaros

💭
Make it work, make it right, make it fast.
View GitHub Profile
@Katsaros
Katsaros / style.css
Created October 1, 2021 20:33
Style scrollbar in a div in Angular2
/* width */
::-webkit-scrollbar {
width: 17px;
}
/* Track */
::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px grey;
border-radius: 20px;
}
@Katsaros
Katsaros / page-center-1.html
Last active July 8, 2022 12:40
How to center divs
<!-- Vertical Centering in CSS -->
<div style="display: table; height: 100%; overflow: hidden;">
<div style="display: table;height: 100%;overflow: hidden;">
<div>
Vertical Center
</div>
</div>
</div>
@Katsaros
Katsaros / page.component.html
Last active May 31, 2022 12:17
Angular 2, solve recursion problem with infinity children in nested objects, by showing them as separate divs
<div class="row">
<ng-template #recursiveList let-yourListName>
<div class="col-12" *ngFor="let item of yourListName; let i=index;">
<div class="mystyle" style="text-align: center; " (click)="openDialog(item)">{{item.title}}</div>
<div class="row" *ngIf="item.children.length > 0">
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.children }"></ng-container>
</div>
</div>
</ng-template>
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: yourListName }"></ng-container>
@Katsaros
Katsaros / Renamator.ps1
Last active September 22, 2021 13:30
Replace names and texts in multiple directories and files. Run it using PowerShell, with command .\Renamator.ps1
$files = Get-ChildItem "C:\Users\Me\Desktop\directoryname*" -Recurse
$find = 'text-to-change'
$replace = 'with-this-one'
$textChanges = 0
$fileAndFolderNameChanges = 0
write-host "`n [INFO][Starting the process to change the text"$find" to "$replace" inside the files]"