Skip to content

Instantly share code, notes, and snippets.

Avatar
🍕
Eating pizza

Andrius Putna fordnox

🍕
Eating pizza
View GitHub Profile
@fordnox
fordnox / DNS_TO_LOCALHOST.markdown
Created November 18, 2022 14:16 — forked from tinogomes/DNS_TO_LOCALHOST.markdown
Public DNS Pointing to localhost (127.0.0.1)
View DNS_TO_LOCALHOST.markdown

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

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 127.0.0.1 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 127.0.0.1.

  • localhost - It will always works. Do you know why? <--- Now there's no sorry.
  • [*.]fbi.com - 👏 👏 👏 👏 👏
@fordnox
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
View clone_and_push.bash
# from https://stackoverflow.com/a/30352360/6816965
# 1. clone the publish repo and push it into the private one
git clone --bare https://github.com/exampleuser/public-repo.git
cd public-repo.git
git push --mirror https://github.com/yourname/private-repo.git
cd ..
rm -rf public-repo.git
# 2. work on the private repository as usual
@fordnox
fordnox / world.json
Created August 29, 2022 10:52
World countries coordinates
View world.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fordnox
fordnox / postgres-brew.md
Created July 6, 2022 05:24 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)
View postgres-brew.md

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@fordnox
fordnox / cloudflare_bulk_delete_dns.py
Created February 4, 2022 10:30 — forked from almazkun/cloudflare_bulk_delete_dns.py
Cloudflare bulk delete dns
View cloudflare_bulk_delete_dns.py
"""
This module is contains a handy tool to bulk delete DNS records from Cloudflare DNS via API
Usage:
```bash
git clone https://gist.github.com/bb15b3fc54ec6cbe7476b52c49e7c4aa.git
cd bb15b3fc54ec6cbe7476b52c49e7c4aa
python3 ./cloudflare_bulk_delete_dns.py your_api_token zone_id
```
"""
@fordnox
fordnox / gaby.php
Created August 23, 2021 19:48
For Gaby
View gaby.php
<?php
$a=['Automattia','WordPresq','Jetpaci','WooCommercc'];
$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);
var_dump($data);
@fordnox
fordnox / Makefile
Last active November 2, 2020 17:18
Makefile semver
View Makefile
.SILENT:
revbump:
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
@fordnox
fordnox / converter.sh
Created December 21, 2019 16:29
Convert image formats on MacOS
View converter.sh
#!/bin/bash
#Convert all jpeg files in current dir to PNG in new folder Converted
sips -s format png *.jpeg –out Converted
#Convert all tiff files in current dir to jpeg in new folder Converted
sips -s format jpeg *.tiff –out Converted
View test.php
<?php
echo date('c');
?>
@fordnox
fordnox / index.html
Created April 2, 2019 13:36
this is an example of index pafge
View index.html
<!DOCTYPE html>
<html>
<body>
<?php
echo "This is a very simple php example.";
?>
</body>
</html>