Skip to content

Instantly share code, notes, and snippets.

The Working Dead

Marius Gerum mariusgerum

The Working Dead
Block or report user

Report or block mariusgerum

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mariusgerum / check-volume.bat
Created May 13, 2019
CMD script to check if a volume is plugged in or removed (for Windows)
View check-volume.bat
:: ===================================================
:: This script checks if a volume is plugged in or
:: if it has been removed. Useful to detect if
:: someone removed your USB stick from your computer
:: during your absence.
:: ---------------------------------------------------
:: Note: all actions are logged in drive-listener.txt
:: (this file will be created in the same folder
:: where this file resides)
:: TODO: specify the volume below (set vol=***)

[PHP], 67 bytes

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

[Try it online!][TIO-jd3parkd]

mariusgerum / foobar.php
Created Jan 29, 2018
Short loop foo-bar-foobar - the array-way
View foobar.php
<?php while(++$i<99)echo['Foo','Bar','Foobar'][$i%6?$i%2?$i%3?'':1:0:2];
mariusgerum / foobar.php
Last active Jan 29, 2018
Ultra fucking short foo-bar-foobar loop
View foobar.php
<?php while(++$i<99)echo$i%6?$i%2?$i%3?'':'Bar':'Foo':'Foobar';
mariusgerum / downloader.php
Last active Oct 17, 2017
PHP file downloader
View downloader.php
# Prepare php.ini settings - adjust these values if needed
ini_set('upload_max_filesize', '128M');
ini_set('max_input_time', '300');
ini_set('memory_limit', '128M');
ini_set('max_execution_time', '300');
ini_set('post_max_size', '128M');
try {
mariusgerum / scraper.php
Created Aug 30, 2017
Verbesserte version
View scraper.php
# Soll das leer sein?
$path = '';
try {
# Prüfen ob "url" in GET übergeben wurde
if (isset($_GET['url'])) {
# Prüfen ob "wait" in GET übergeben wurde und eine gültige Zahl ist
if (isset($_GET['wait']) && is_numeric($_GET['wait'])) {
View pretty-output.php
* This function returns a nice output of any given type of data
* @param mixed $value Some value (variable, object, array, class, whatever)
* @return string
function pre($value) {

Keybase proof

I hereby claim:

  • I am mariusgerum on github.
  • I am mariusgerum ( on keybase.
  • I have a public key ASCh8CWp_xkFVGg_gCGstzJS12yHGP-TsQ-UQuBa4aLGJwo

To claim this, I am signing this object:

View simple-parallax.js
* Listen for scrolling events
* Note:
* - This is for parallax in header-containers only.
* - Requires jQuery
jQuery(document).on('scroll', function () {
/* Get current scroll-value */
var ScrollTop = jQuery(document).scrollTop();
You can’t perform that action at this time.