Skip to content

Instantly share code, notes, and snippets.

@bondarewicz
bondarewicz / zip2tz.csv
Created October 24, 2024 16:47 — forked from benjiwheeler/zip2tz.csv
Zip to Time Zone csv
We can't make this file beautiful and searchable because it's too large.
'00501','Holtsville','NY','America/New_York'
'00544','Holtsville','NY','America/New_York'
'01001','Agawam','MA','America/New_York'
'01002','Amherst','MA','America/New_York'
'01003','Amherst','MA','America/New_York'
'01004','Amherst','MA','America/New_York'
'01005','Barre','MA','America/New_York'
'01007','Belchertown','MA','America/New_York'
'01008','Blandford','MA','America/New_York'
'01009','Bondsville','MA','America/New_York'
@bondarewicz
bondarewicz / florida-timezones.cs
Created October 24, 2024 14:51
florida-timezones.cs
private static TimeZoneInfo GetTimeZoneForFloridaUsa(int postalCode)
{
var centralTimeList = new List<int>
{
32401, 32402, 32403, 32404, 32405, 32406, 32407, 32408, 32409, 32410, 32411, 32412, 32413, 32417, 32420,
32421, 32422, 32423, 32424, 32425, 32426, 32427, 32428, 32430, 32431, 32432, 32433, 32434, 32435, 32437,
32438, 32439, 32440, 32442, 32443, 32444, 32445, 32446, 32447, 32448, 32449, 32454, 32455, 32459, 32460,
32461, 32462, 32464, 32465, 32466, 32501, 32502, 32503, 32504, 32505, 32506, 32507, 32508, 32509, 32511,
32512, 32513, 32514, 32516, 32520, 32521, 32522, 32523, 32524, 32526, 32530, 32531, 32533, 32534, 32535,
32536, 32537, 32538, 32539, 32540, 32541, 32542, 32544, 32547, 32548, 32549, 32550, 32559, 32560, 32561,
@bondarewicz
bondarewicz / iron.cs
Last active April 10, 2024 11:28
IronPdf png rotate
[Fact]
public async Task Pdf_WithValidPdf_WillReturnPng()
{
License.LicenseKey =
"lincence here";
Installation.LinuxAndDockerDependenciesAutoConfig = false;
Installation.Initialize();
var base64Pdf = await File.ReadAllTextAsync(@"./_ParcelForceLabel.txt");
git diff >> some-changes.patch
...send file to someone...
git apply /path/to/some-changes.patch
@bondarewicz
bondarewicz / housekeeping_images.sh
Created March 16, 2020 16:48 — forked from DaanGeurts/housekeeping_images.sh
Deleting unused images from Google Container Registry, leaving x number left
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@bondarewicz
bondarewicz / tbd.md
Created January 29, 2020 14:05
TBD Workflow

Dev1 creates a (short-lived) feature branch from trunk

git checkout master
git checkout -b feat-1

Dev1 do his work and commits there...

@bondarewicz
bondarewicz / 00-intro.md
Created March 9, 2019 18:22 — forked from mdo/00-intro.md
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

PROJECT_NAME="$(basename -s .git `git config --get remote.origin.url` | tr "[:upper:]" "[:lower:]")" | REV="$(git rev-parse --short HEAD)" | BRANCH="$(git branch | grep \* | cut -d ' ' -f2 )" | sed -i "" "s/{{namespace}}/${PROJECT_NAME}-${BRANCH}-sha.${REV}/g" file.yaml
lookup: https://web.archive.org/web/*/example.com
save: https://web.archive.org/save/http://example.com
@bondarewicz
bondarewicz / pre-commit
Created May 1, 2018 14:57 — forked from hraban/pre-commit.md
Git pre-commit hook (.git/hooks/pre-commit) to prevent accidentally committing debug code (add NOCOMMIT in source comment)
#!/bin/sh
# This pre-commit hook will prevent you from committing any line (or filename) containing
# the string NOCOMMIT. Use that tag in comments around source code you want to avoid
# accidentally committing, like temporary IP addresses or debug printfs.
#
# To add it to an existing repository, save it to .git/hooks/pre-commit (or append, if
# that file already exists). Remember to make executable (chmod +x ...)
#
# To automatically add this pre-commit hook to every repository you create or clone: