Skip to content

Instantly share code, notes, and snippets.

@benschw
benschw / Dockerfile
Last active October 1, 2018 18:30
MySQL Docker Container
FROM ubuntu
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get -y install mysql-client mysql-server
@sloria
sloria / bobp-python.md
Last active May 12, 2024 06:54
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@andrewspencer
andrewspencer / StringUtil.java
Created May 2, 2011 14:40
Remove accents from a String
package net.andrewspencer.util;
import sun.text.Normalizer; // java.text.Normalizer in 1.6
/**
* Here's how to remove accents in Java 1.5.
* NB Doesn't separate ligatures.
*/
// WARNING Uses unofficial Sun classes, so JVM-dependent.
// Normalizer became standard in Java 1.6, though.