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
mariusgerum / array-duplicates.php
Created Apr 22, 2017
Check if an array has duplicates
View array-duplicates.php
<?php
/**
* ===============================
* Check if array has duplicates
* ===============================
*/
$arr = [ 1, 2, 3, 3 ];
View keybase.md

Keybase proof

I hereby claim:

  • I am mariusgerum on github.
  • I am mariusgerum (https://keybase.io/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();
View pretty-output.php
<?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) {
@mariusgerum
mariusgerum / scraper.php
Created Aug 30, 2017
Verbesserte version
View scraper.php
<?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'])) {
@mariusgerum
mariusgerum / downloader.php
Last active Oct 17, 2017
PHP file downloader
View downloader.php
<?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
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
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];
View codegolf-alphabet-wave.md

[PHP], 67 bytes

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

[Try it online!][TIO-jd3parkd]

You can’t perform that action at this time.