Don't wanna be here? Send us removal request.
Text
WTF does it mean '>>' in Apache Airflow
In Python, '>>' is bitwise shift. Who ever used this operator on a serious project? Do you even work low-level in Python instead of Rust or Zig? HAHAHAHHAHAHAHA
Anyway, Airflow overloaded the useless bitwise operators in this class https://github.com/apache/airflow/blob/8505d2f0a4524313e3eff7a4f16b9a9439c7a79f/airflow/models/taskmixin.py .
So:
>> is equivalent to set_downstream()
<< is equivalent to set_upstream()
0 notes
Text
How to run a fucking dummy server in HTTPS
sudo docker run -e HTTPS_PORT=5601 -p 5601:5601 --rm -t mendhak/http-htts-echo:17
0 notes
Text
How the fuck can you remove git from fish shell prompt
Fish shell uses the fish_prompt function, and you can see which script has defined this function running
functions fish_prompt
You can adapt the function there as you wish, for example if you see
if git_is_repo this else that end
Just comment out everything and write that instead, or overwrite the function in your ~/.config/fish/config.fish .
0 notes
Text
How can Pornhub send network packages to your private IP on your home network, instead of sending them to your sister's iPhone on same network
Last day you visited PornHub and opened Chrome, making for the first time full use of the 16 GB of RAM you paid for.
Your PC sent a request to the 443 of the Pornhub IP, which is public.
How can PornHub reach the internal IP where your PC sits?
Oh dear, you thought you knew something about network since you configured the nginx firewall rule of your client, but you don't know shit.
When you visit Pornhub, the source IP is changed to the private IP of your PC, to the one of your router, which has a public IP, but also the source port changes to a random one, for example 64321. The router keeps track of this mapping, so when Pornhub reaches the router again to show your selected content, it sends its packages to the 64321 port of the router public IP, which it associated to your internal IP.
This is called Port Address Translation, which is a special case of Network Address Translation aka NAT. NAT can also be implemented using different public IPs, instead of different ports like PAT, but you know IPv4 slots are exhausting.
PAT happens at TCP level, cause IP protocol doesn't know what a port is.
0 notes
Photo
YAML Cheat Shit
YAML was first named "Yet Another Markup Language" and later "YAML Ain't Markup Language", because even the inventors didn't know what fuck it was. For monkeys like us, it's just the other language you need to learn to pay the bills of your wife's boyfriend.
Whitespaces
As any wrong language, it requires whitespaces for indentation, so that if you miss a space you can receive a random-generated error.
If you track the YAML errors inside your companies, you can build a cryptographically secure pseudorandom generator.
Comments
Comments begin with #
Lists
You can write lists in two ways:
- member1 - member2 - member3
or
[member1, member2, member3]
Maps / dictionaries
You can write maps in two ways, one is:
key1: value1 key2: value2
and remember to add the fucking space after ":".
Another way is using
{key1:value1, key2:value2}
and in this way, you do not need the fucking space.
Strings
The fuck you want, ' or " and you can escape the double quotes with \ .
Multiline
No human knows how to write multiline, so there is a website for generating multiline snippet shits for monkeys like us: yaml-multiline.info .
WTF is ---
If you need to cat your documents, or if you need to use directives, each document must begin with ---, plus you can optionally end them with ... .
It's not mandatory if you don't need directives or concatenate YAML documents, but you will find --- everywhere because your IT is full of overpaid monkeys like us.
Directives (%)
% at the beginning is a directive, so usually useless for the monkeys.
Referencing nodes multiple times
You can refer to a YAML node denoting it with & and referencing it with *
- shit: &shit penis: 30 - same_shit: *shit
More useful shit
Linter
sudo apt install yamllint
Show it in another wrong language like JSON
Python:
python3 import yaml f = open('sheet.yaml','r') yaml.safe_load(f)
0 notes
Photo
What the fuck are the commands to uncompress and compress folders as TAR.GZ
"tar eXtract Fucking Zip" command
tar xfz archive_name.tar.gz
"tar Compress Fucking Zip" command
tar cfz archive_name.tar.gz foldername
The fucking tar doesn't automatically choose the folder name as archive name, you have to specify the fucking archive name.
1 note
·
View note