Skip to content

Instantly share code, notes, and snippets.

View Ellestad1995's full-sized avatar
🎯
Focusing

Joakim Ellestad Ellestad1995

🎯
Focusing
  • Sopra Steria
  • Norway
View GitHub Profile
# 05.06.2020 00:00:00
$format = "dd.MM.yyyy hh:mm:ss";
function IsDateTime($date)
{
try{
if($date.GetType().Name -eq 'String'){
[datetime]$dirDate = New-Object DateTime
if (!([DateTime]::TryParseExact($date,$format, [System.Globalization.CultureInfo]::InvariantCulture, [System.Globalization.DateTimeStyles]::None, [ref]$dirDate)))
{
return $false
@Ellestad1995
Ellestad1995 / Powershell 7 Preview profile
Last active October 24, 2019 19:24
Microsoft Windows Terminal profiles
{
"guid" : "{90cbdc15-f4fe-49d2-a245-ec066b70845f}",
"acrylicOpacity" : 0.7,
"closeOnExit" : true,
"colorScheme": "One Half Dark",
"commandline" : "C:\\Program Files (x86)\\PowerShell\\7-preview\\pwsh.exe",
"backgroundImage" : "D:\\Pictures\\pwsh_avatar2-removebg.png", \\ https://imgur.com/a/HQCl3SI
"backgroundImageAlignment" : "bottomRight",
"backgroundImageStretchMode": "none",
"backgroundImageOpacity": 0.3,
@Ellestad1995
Ellestad1995 / DBConfig.php
Created May 25, 2019 14:57
Database connection/PDO in php
<?php
return array(
'dbname' => 'somedbname',
'host' => 'database',
'username' => 'admin',
'password' => 'admin',
);
?>
@Ellestad1995
Ellestad1995 / Dockerfile.api
Created May 25, 2019 09:40
docker-compose setup for php backend, node frontend, mariadb database
#Installer image
FROM phpstorm/php-71-apache-xdebug:latest
#Install composer
#COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
#COPY ./api/src/composer.json /var/www/composer.json
#ENV COMPOSER_ALLOW_SUPERUSER 1
WORKDIR /var/www/
@Ellestad1995
Ellestad1995 / settings.json
Created April 23, 2019 08:47
VSCode settings
{
"telemetry.enableTelemetry": false,
"git.autofetch": true,
"workbench.colorTheme": "Visual Studio Light",
"workbench.editor.labelFormat": "short",
"breadcrumbs.enabled": true,
"editor.minimap.enabled": false
}

Keybase proof

I hereby claim:

  • I am ellestad1995 on github.
  • I am joakim_ne (https://keybase.io/joakim_ne) on keybase.
  • I have a public key ASCdRksKtleEX-WHq-zZy9XCdKgwd35FscYadUFT8XEBsgo

To claim this, I am signing this object: