Skip to content

Instantly share code, notes, and snippets.

@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
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:
@bondarewicz
bondarewicz / dropdown.md
Last active January 26, 2018 16:43 — forked from citrusui/dropdown.md
"Dropdowns" in Markdown
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.
curl -kso /dev/null -H "Pragma: no-cache" -H "Cache-Control: no-cache" -w "DNS: %{time_namelookup}, \
SSL: %{time_appconnect}, \
TCP: %{time_connect}, \
TTFB: %{time_starttransfer}, \
TOTAL: %{time_total}\n" https://www.parcelhero.com