Skip to content

Instantly share code, notes, and snippets.

View maebert's full-sized avatar
👨‍🚀
Confusing the persistent hallucination of thinking for the persistence of being

Manu Ebert maebert

👨‍🚀
Confusing the persistent hallucination of thinking for the persistence of being
View GitHub Profile

Ideas for side programming projects:

  • A habit tracker to track how often you work out / meditate / get wasted
  • A simple story generator (see @MagicRealismBot)
  • A text adventure
  • A text adventure that's played with a Telegram or Kik bot, where you tell the bot what to do and the bot tells you what it sees
  • An app that saves all the little insights into life you ever had ("99% of the time people are behaving weird around you it has nothing to do with you. You're not that important!") and sends you an old one per mail every day
  • A Twitter bot that replies "Don't you mean DRUMPF?" whenever somebody mentions Donald Trump
  • A tamagotchi in your command line
  • A twitter bot that will say "nomnomnom" when users "feed" it food emojis (🌭, 🍏, ...)
@maebert
maebert / latest_topic.txt
Last active August 29, 2018 04:30
Get notified when somebody posts a new topic in a forum
71750

Keybase proof

I hereby claim:

  • I am maebert on github.
  • I am maebert (https://keybase.io/maebert) on keybase.
  • I have a public key whose fingerprint is E463 E807 A4C6 4035 31AD D5FA FA39 CA2C E213 D791

To claim this, I am signing this object:

#!/usr/bin/env python
"""Reduces dependency constraints to a minimal set.
Example: if a package is required in version '>2.2 >3.0 <=4.1', then >2.2 is
redundant in here -- it's entailed in >3.0 Likewise, in '>=4.2 !=4.2' should
just be '>4.2' etc.
This script reads in version constrains such as '>2.2 >3.0 <=4.1' and prints
a reduced list of constraints or unsatisfa if the constraints can't be
@maebert
maebert / unbox.sh
Created February 25, 2014 00:42
Setting up a new bac
#!/bin/bash
# This script automatically installs a bunch of command line (Git, wget,
# imagemagick, ...) and GUI (Dropbox, Chrome, Skype, ...) apps on a fresh
# Mac.
#
# It also sets up a Python Scientific Computing environment (matplotlib,
# scipy, iPython Notebook, ...)
#
# Requirement: Have the XCode Command Line Tools installed (download from
// Without jQuery:
var setSplashHeight = function () {
document.getElementById("splash").style.height = "innerHeight" in window ? window.innerHeight : document.documentElement.offsetHeight;
}
setSplashHeight();
window.onresize = setSplashHeight();
// With jQuery:
var jSetSplashHeight = function () {
@maebert
maebert / get_shortcode.py
Created February 20, 2013 20:13
Gets the shortest unique code (e.g. for URL shorteners) that avoids confusion between characters (such as I and 1, 0 and O).
def get_code(num, alphabet="23456789ABCDEFGHJKLMNPQRSTUVWXYZ"):
base = len(alphabet)
result = ""
num, rem = divmod(num, base)
while num:
result += alphabet[rem]
num, rem = divmod(num, base)
result += alphabet[rem]
return result[::-1]
// Provides mixins that automatically replace sprite icons with retina images on appropriate devices.
@highdpi: ~"(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";
.sprite (@path, @size, @w, @h, @pad: 0) when (isstring(@path))
{
background-image: url(@path);
width: @size;
height: @size;
display: inline-block;
@maebert
maebert / wiimote.py
Created May 29, 2012 16:10
Python WiiMote
"""Wiimote wrapper class."""
import cwiid
class Wiimote():
_buttons = {
'B': 1<<2, 'home': 1<<7
}
def __init__(self, calib = (100, 150, 100, 150)):
self.wm = None
@maebert
maebert / _intro.md
Created May 29, 2012 09:05
Scientific Computing with Python

Scientific Computing with Python

Why Python?

  • Programming is fun again!
  • Free (as in beer and as in speech)
  • Steep learning curve
  • Highly readable, easy to code
  • Batteries included
  • Package management