Skip to content

Instantly share code, notes, and snippets.

View michel-zimmer's full-sized avatar

Michel Zimmer michel-zimmer

View GitHub Profile
@michel-zimmer
michel-zimmer / mining-turtle.lua
Created February 27, 2016 17:25
Minecraft Mining Turtle Ore Quarry v0.71 by AustinKK
-- ********************************************************************************** --
-- ** ** --
-- ** Minecraft Mining Turtle Ore Quarry v0.71 by AustinKK ** --
-- ** ---------------------------------------------------- ** --
-- ** ** --
-- ** For instructions on how to use: ** --
-- ** ** --
-- ** http://www.youtube.com/watch?v=PIugLVzUz3g ** --
-- ** ** --
-- ** Change Log: ** --
@michel-zimmer
michel-zimmer / .getignore
Last active July 25, 2016 10:12
How to use GitHub to host Unity repositories
#==Unity
#==Global/MonoDevelop
#==Global/Linux
#==Global/OSX
#==Global/Windows
/**
* Executes callback with the latter execution of a() and b().
*
* Example:
* let x = ab((a, b) => {
* console.log(a, b);
* });
* x.a();
* x.b(1234);
*
if(!window.jQuery||confirm('Overwrite\x20current\x20version?\x20v'+jQuery.fn.jquery))(function(d,s){s=d.createElement('script');s.src='https://code.jquery.com/jquery-latest.js';(d.head||d.documentElement).appendChild(s)})(document);
function song_row_as_json(el) {
return {
title: jQuery(jQuery("td[data-col='title'] span", el).contents()[1]).text(),
duration: jQuery("td[data-col='duration'] span", el).text(),
artist: jQuery("td[data-col='artist'] span a", el).text(),
album: jQuery("td[data-col='album'] span a", el).text()
};
}
#!/usr/bin/env node
let data = "";
process.openStdin().on('data', (chunk) => data += chunk).on('end', () => console.log(JSON.parse(data).map((song) => `${song.artist} - ${song.title} (${song.duration}) [${song.album}]`).join('\n')));
#!/usr/bin/env node
const ignorecase = true;
const include = "abcdefghijklmnopqrstuvwxyz";
function lpd(data) {
// prepare
let distribution = {};
let sum = 0;
include.split('').forEach(c => distribution[c] = 0);
#!/bin/sh
if [ "${1}" = '-vv' ]; then
apt-get update
apt-get dist-upgrade --assume-yes --force-yes
apt-get autoremove --assume-yes --force-yes --purge
apt-get clean --assume-yes --force-yes
elif [ "${1}" = '-v' ]; then
apt-get update -q
apt-get dist-upgrade --assume-yes --force-yes -q
@michel-zimmer
michel-zimmer / myhomework.com-ad-removal.user.js
Last active February 5, 2017 17:11
Removes ads on myhomework.com and and allows display of third column
// ==UserScript==
// @name myHomework Ad removal
// @namespace https://www.mzimmer.net/
// @version 1.0.1
// @description Removes ads on myhomework.com and and allows display of third column
// @author Michel Zimmer <[email protected]> (https://www.mzimmer.net)
// @match https://myhomeworkapp.com/*
// @grant none
// ==/UserScript==
@michel-zimmer
michel-zimmer / README.md
Last active April 27, 2021 11:36
Docker Swarm inside LXC 2.0

Docker Swarm inside LXC 2.0

sudo lxd init

./swarm-manager-create.sh
./swarm-agent-create.sh swarm-agent-{0..9}

lxc exec swarm-manager -- docker -H localhost:3375 info
// chrome://settings/searchEngines
var chromeSearchEngineCleaner = window.setInterval(function () {
var button = document.querySelector('#other-search-engine-list .row-delete-button');
if (button) {
button.click();
} else {
window.clearInterval(chromeSearchEngineCleaner);
}
}, 100);