Skip to content

Instantly share code, notes, and snippets.

View szymczakk's full-sized avatar
:octocat:

Krzysiek Szymczak szymczakk

:octocat:
View GitHub Profile
5F5F2020205F5F202020202020202020202020202020205F2020202020202020205F2020202020202020202020202020205F2020205F20205F5F2020205F5F2020202020202020202020202020202020202020205F202020202020200A5C205C202F202F5F5F20205F2020205F202020205F5F7C207C205F5F205F20207C207C5F5F2020205F5F5F20205F5F5F7C207C5F7C207C205C205C202F202F5F5F20205F2020205F20205F5F2020202020205F285F295F205F5F20200A205C2056202F205F205C7C207C207C207C20202F205F60207C2F205F60207C207C20275F205C202F205F205C2F205F5F7C205F5F7C207C20205C2056202F205F205C7C207C207C207C205C205C202F5C202F202F207C20275F205C200A20207C207C20285F29207C207C5F7C207C207C20285F7C207C20285F7C207C207C207C5F29207C20205F5F2F5C5F5F205C207C5F7C5F7C2020207C207C20285F29207C207C5F7C207C20205C2056202056202F7C207C207C207C207C0A20207C5F7C5C5F5F5F2F205C5F5F2C5F7C20205C5F5F2C5F7C5C5F5F2C5F7C207C5F2E5F5F2F205C5F5F5F7C7C5F5F5F2F5C5F5F285F292020207C5F7C5C5F5F5F2F205C5F5F2C5F7C2020205C5F2F5C5F2F207C5F7C5F7C207C5F7C0A2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020
2020205F5F5F5F5F2020202020202020202020205F5F20202020202020205F5F20205F5F20202020202020202020202020202020202020205F202020202020205F5F20202020202020202020205F5F2020202020205F5F5F5F5F202020202020205F5F20205F2020202020205F5F5F5F20202020202020202020205F5F20205F202020202020202020202020205F5F2020205F202020202020205F5F20202020202020202020205F5F2020202020202020202020205F5F20202020205F5F5F5F5F2020202020202020202020205F5F202020200A20202F205F5F5F2F5F5F5F5F5F5F5F5F5F205F2F202F5F5F2020202020205C205C2F202F5F5F5F20205F5F20205F5F5F5F5F5F5F2020207C207C20202020202F202F5F5F5F20205F5F5F5F5F2F202F5F5F2020202F205F5F5F2F5F5F5F5F205F2F202F5F285F295F5F5F5F2F205F5F2F5F5F5F205F5F5F5F5F5F2F202F5F285F295F5F5F20205F5F5F5F20202F202F20207C207C20202020202F202F5F5F5F20205F5F5F5F5F2F202F5F5F2020205F5F5F5F205F2F202F5F2020202F205F5F5F2F5F5F5F5F5F5F5F5F5F205F2F202F5F5F5F200A20205C5F5F205C2F205F5F5F2F205F5F20602F202F205F205C2020202020205C20202F205F5F205C2F202F202F202F205F5F5F2F2020207C207C202F7C202F202F205F5F205C2F205F5F5F2F202F2F5F2F2020205C5F5F20
@szymczakk
szymczakk / SetColumnTypeIfNoColumnAttribute.cs
Created January 8, 2021 16:52
[EF Core] Set column type, if not defined in Column attribute
private void SetColumnTypeIfNoColumnAttribute(ModelBuilder builder, string sqlType, params Type[] types)
{
foreach (var property in builder.Model.GetEntityTypes()
.SelectMany(t => t.GetProperties())
.Where(p => types.Contains(p.ClrType))
.Where(p => !Attribute.IsDefined(p.PropertyInfo, typeof(ColumnAttribute))))
{
property.SetColumnType(sqlType);
}
}
@szymczakk
szymczakk / choco
Last active February 12, 2022 13:26
choco scripts for work
choco install microsoft-teams -y
choco install git -y
choco install vscode -y
choco install powertoys -y
choco install GoogleChrome -y
choco install nvm -y
choco install notepadplusplus -y
choco install kdiff3 -y
choco install azure-data-studio -y
choco install slack -y
@szymczakk
szymczakk / gist:04e490c47d7211effc9e2d6aa6940853
Created December 12, 2017 15:31
Disposable order question
public class NextDisposableResource: DisposableResource
{
private DisposableResource disposableResource;
protected override void Dispose(bool disposing)
{
disposableResource.Dispose();
base.Dispose(disposing);
}
}
### Keybase proof
I hereby claim:
* I am szymczakk on github.
* I am szymczakk (https://keybase.io/szymczakk) on keybase.
* I have a public key ASAp1T_xET0i4ZhlBN780EvEmmhA6e5v3wBUNqZ123FFHAo
To claim this, I am signing this object:
@szymczakk
szymczakk / yolo
Created March 27, 2016 01:26 — forked from tagrudev/yolo
YOLO practices #RubyOnRails
# Do not refactor, it is a bad practice. YOLO
# Not understanding why or how something works is always good. YOLO
# Do not ever test your code yourself, just ask. YOLO
# No one is going to read your code, at any point don't comment. YOLO
# Why do it the easy way when you can reinvent the wheel? Future-proofing is for pussies. YOLO