Skip to content

Instantly share code, notes, and snippets.

View michel-zimmer's full-sized avatar

Michel Zimmer michel-zimmer

View GitHub Profile
#!/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
#!/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);
#!/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')));
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()
};
}
/**
* 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);
*
@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
@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: ** --
package hacked.puzzles.story.cyber_attack.match;
import java.util.ArrayList;
public enum Bracket {
CLOSE {
@Override
public String toString() {
return ")";
}
@michel-zimmer
michel-zimmer / Table.md
Created March 17, 2015 00:30
License comparison
MIT License Apache License 2.0 GNU General Public License v3.0
Disclose Source Required
License and copyright notice Required Required Required
State Changes Required Required
Commercial Use Permitted Permitted Permitted
Distribution Permitted Permitted Permitted
Modification Permitted Permitted Permitted
Patent Grant Permitted Permitted
Private Use Permitted Permitted Permitted
<!DOCTYPE html>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="jquery-linedtextarea.js"></script>
<script>
jQuery( function( $ ) {
function send() {
$( "#url" ).prop( "disabled", true );
$( "#send" ).prop( "disabled", true );
$( "#request" ).prop( "disabled", true );
$.ajax( {