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
fordnox / world.json
Created August 29, 2022 10:52
World countries coordinates
Loading
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)

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
"""
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
<?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
.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
#!/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
<?php
echo date('c');
?>
@fordnox
fordnox / index.html
Created April 2, 2019 13:36
this is an example of index pafge
<!DOCTYPE html>
<html>
<body>
<?php
echo "This is a very simple php example.";
?>
</body>
</html>
@fordnox
fordnox / index.php
Last active May 14, 2019 11:41
this is an example of index pafge
<!DOCTYPE html>
<html>
<body>
<?php
echo "This is a very simple php example.";
?>
</body>
</html>
@fordnox
fordnox / crop.sh
Created January 24, 2019 20:12
crop resize sharpen with image magic
convert *.png -set filename:base "%[basename]" -crop 2048x2048+0+0 -resize 640x640 -sharpen 0x1 res/"%[filename:base].png"