Skip to content

Instantly share code, notes, and snippets.

View xmgr's full-sized avatar
💀
The Working Dead

Marius Gerum-Richter xmgr

💀
The Working Dead
View GitHub Profile
@xmgr
xmgr / prompt.md
Last active January 10, 2024 23:10

My prompt

This prompt is a colorful and informative representation of the shell, user, hostname, working directory, Git branch (if applicable), and the exit status of the last command. The use of ANSI escape sequences allows for color formatting in the terminal.

Prompt

# Optional: prepend "($?)($0)"
@xmgr
xmgr / codegolf-alphabet-wave.md
Last active January 31, 2018 23:34
Codegolf alphabet wave

[PHP], 67 bytes

    <?php $s='A';while($s!='AA')echo str_repeat($s++.(--$s)[0],13)."
    ";

[Try it online!][TIO-jd3parkd]

@xmgr
xmgr / foobar.php
Created January 29, 2018 20:44
Short loop foo-bar-foobar - the array-way
<?php while(++$i<99)echo['Foo','Bar','Foobar'][$i%6?$i%2?$i%3?'':1:0:2];
@xmgr
xmgr / foobar.php
Last active January 29, 2018 20:23
Ultra fucking short foo-bar-foobar loop
<?php while(++$i<99)echo$i%6?$i%2?$i%3?'':'Bar':'Foo':'Foobar';