Skip to content

Instantly share code, notes, and snippets.

Marco Pfeiffer Nemo64

Block or report user

Report or block Nemo64

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
Nemo64 / userscript.js
Created Jul 22, 2019
This is a userscript for tampermonkey to automatically remove a bunch of urls from google.
View userscript.js
// ==UserScript==
// @name Bulk removal google hack
// @namespace
// @version 0.1
// @description Bulk remove a search result from google
// @author Marco Pfeiffer
// @match*
// @grant none
// ==/UserScript==
Nemo64 / elevatorgame.js
Created Dec 21, 2018
my solution to the elevator game (not perfect)
View elevatorgame.js
init: function(elevators, floors) {
this.elevators = elevators;
this.floors = floors;
this.todos = [];
this.time = 0;
this.overSizeTheashold = 6;
for (let floor of floors) {
floor.on('down_button_pressed', () => this.addFloorButtonPush(floor, 'down'));
Nemo64 / AbstractDbalRepository.php
Last active Oct 2, 2018
createQueryBuilder for typo3 extbase repository using dbal
View AbstractDbalRepository.php
namespace Vendor\Extension\Domain\Repository;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\QueryBuilder;
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper;
Nemo64 / poll.txt
Last active Sep 20, 2018 essens poll
View poll.txt
/poll "Was wollen wir heute essen?
Ciao Bella:
Taverna Romana:" "Ciao Bella (Italiener)" :pizza: "Döner/Paulis Kumpir (und Croque)/Thai Pauli" :stuffed_flatbread: "Azeitona (Falafel)" :broccoli: "Olympisches Feuer (Grieche)" :amphora: "Kleine Pause (Fast food)" :fries: "Asia Imbiss (Asiate)" :ramen: "Maharaja (Inder)" :curry: "Trattoria da Mario (Italiener)" :spaghetti: "Taverne Romana" :stew: "Graupi" :potato:
Nemo64 / fulltextSearch.js
Created Mar 14, 2018
some utilities for searching though arrays
View fulltextSearch.js
(function ($, _) {
"use strict";
var escapeRegExp = function (str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
var characterGlue = '[^a-zA-Z0-9]*';
var charMap = (function() {
Nemo64 / gulpfile.js
Last active Sep 25, 2016
Gulp File for simple js project
View gulpfile.js
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var deployPath = 'dist';
gulp.task('default', ['build']);
gulp.task('build', ['js', 'css']);
gulp.task('watch', function () {['src/**'], ['js']);
Nemo64 /
Created Nov 9, 2015
git history for multiple folders
#!/usr/bin/env bash
#!/usr/bin/env bash
REPS=`find /home/dev/Workspace -maxdepth 4 -type d -name ".git"`
USERNAME=`git config --get`
echo "search for history of ${USERNAME}"
for REP in $REPS
Nemo64 / .bashrc
Created Aug 31, 2014
Very dynamic and colorfull .bashrc
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files for examples
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
# If not running interactively, don't do anything!
[[ $- != *i* ]] && return
Nemo64 / formhandler.js
Created Aug 25, 2014
common js form additions
View formhandler.js
* User: Marco Pfeiffer
* Date: 04.04.13
* Time: 09:43
(function ($) {
var IMPORTANT_FORMS = "form:not(.unimportant):not([target])";
var IMPORTANT_INPUT_FIELDS = ":input[name]:not(.unimportant)";
Nemo64 / bootstrap_tabs.js
Created Jul 18, 2014
remember which bootstrap tab was active while navigating. This is a very cheap cookie trick and it requires jquery-cookie.
View bootstrap_tabs.js
// behavior for tabs
// FIXME can create unexpected behavior with multiple tabs on one page, also with multiple browser tabs/windows
$(document).on('click', '[data-toggle="tab"], [data-toggle="pill"]', function(event) {
var hash = $.prop(this, "hash");
$.cookie('active-tab', hash, { path: '/' });
$(window).on('popstate hashchange ready load', function() {
var cookieTab = $.cookie('active-tab');
var tab = cookieTab || null;
You can’t perform that action at this time.