Skip to content

Instantly share code, notes, and snippets.

View fordnox's full-sized avatar
Eating pizza

Andrius Putna fordnox

Eating pizza
View GitHub Profile
fordnox / Makefile
Created November 1, 2023 11:31
Random echo between 2 values in Makefile
@if [ $$(($$RANDOM % 2)) -eq 0 ]; then \
echo 1; \
else \
echo 2; \
fordnox / makefile
Created October 5, 2023 09:08
clean all docker shit makefile target
docker stop $$(docker ps -aq) || true
docker rm $$(docker ps -aq) || true
docker container prune -f || true
docker rmi $$(docker images -q) || true
docker image prune -f || true
docker volume rm $$(docker volume ls -q) || true
fordnox /
Created June 30, 2023 07:35
Convert all folder markdown files to html
find ./content -name '*.md' | xargs -n 1 bash -c 'pandoc -f markdown -t html -o "${1/.md/.htm}" "${1}"' -
find ./content -name '*.md' -exec rm {} \;
fordnox / DNS_TO_LOCALHOST.markdown
Created November 18, 2022 14:16 — forked from tinogomes/DNS_TO_LOCALHOST.markdown
Public DNS Pointing to localhost (

Available Public Wildcard DNS Domains pointing to localhost (

DISCLAIMER: I have no responsibility for any domains listed here, or in the comments, and if any of them capture any data transmitted by the HTTP request. At any time, any of the domains listed in this article may stop working (except localhost).

It turns out that some kind hearted people already set up wildcard domains for you already. You can use any domain below and/or any subdomain of these and they currently resolve to but could switch at any time to resolve somewhere else. Here's the list of ones I know about. Let me know if there are more!

NOTE: You can (and should) check if any domain resolve to

  • localhost - It will always works. Do you know why? <--- Now there's no sorry.
  • [*.] - 👏 👏 👏 👏 👏
fordnox / clone_and_push.bash
Created September 22, 2022 17:37 — forked from antomor/clone_and_push.bash
make a private fork of a public repo
# from
# 1. clone the publish repo and push it into the private one
git clone --bare
cd public-repo.git
git push --mirror
cd ..
rm -rf public-repo.git
# 2. work on the private repository as usual
fordnox / world.json
Created August 29, 2022 10:52
World countries coordinates
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
fordnox /
Created July 6, 2022 05:24 — forked from ibraheem4/
Installing Postgres via Brew (OSX)

Installing Postgres via Brew


Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
fordnox /
Created February 4, 2022 10:30 — forked from almazkun/
Cloudflare bulk delete dns
This module is contains a handy tool to bulk delete DNS records from Cloudflare DNS via API
git clone
cd bb15b3fc54ec6cbe7476b52c49e7c4aa
python3 ./ your_api_token zone_id
fordnox / gaby.php
Created August 23, 2021 19:48
For Gaby
$data = array_map(function($value) {
$r = ['a'=>'c', 'q'=>'s', 'i'=>'k', 'c'=>'e'];
return substr($value, 0, strlen($value)-1).$r[$value[-1]];
}, $a);
fordnox / Makefile
Last active November 2, 2020 17:18
Makefile semver
set -e ;\
git tag --sort=v:refname | tail -1
NEW_VERSION=$$( git tag --sort=v:refname | tail -1 | awk 'BEGIN{FS=OFS="."}{print $$1,$$2,$$3+1}' ) ;\
echo "unstable release $$NEW_VERSION" ;\
git tag $$NEW_VERSION
git push --tags