Instantly share code, notes, and snippets.

View gist:0018e3320f99a612c737

Fatal A400M Accident: Airbus Aircraft crashed due to Software Problems

The fatal crash of a brand new A400M military transporter was found to be caused by technical issues. According to information from SPIEGEL ONLINE, three of the aircraft's engines were shut down due to software problems, directly after takeoff.

The cause of the crash of a brand new type A400M military transport aircraft appears to have been identified. According to information from SPIEGEL ONLINE, the engineers from Airbus Military discovered a software problem in engine control unit, that supposedly caused the simultaneous shutdown of three engines.

The investigation produced a clear result: Shortly after the test aircraft took off, the three engines had received conflicting commands and subsequently cut all power.

The pilots, who were testing the A400M, could not have done anything, according to Airbus sources. They still attempted to steer the 45m long plane back to the airport in Seville, but could not control it any more. The ai

# This script is a replacement for the OS X "say" command.
# Built on a Raspberry Pi :)
# to install:
# sudo apt-get install curl mpg123
# sudo curl > say; chmod a+x say; sudo mv say /usr/bin/
# say hello world
import subprocess
View gist:3484012
def run(params)
spec = params[:spec]
code = params[:code]
# check the user-provided code for nasties
policy =
return error("Disallowed code in the spec") unless spec.accepts policy
return error("Disallowed code in the solution") unless code.accepts policy
group = eval spec
View brackets_or_not.rb
require 'benchmark'
# very simple method, so we only test method call time
def a(n)
# 1,000,000 lines of one method call
lines_wb = "a(1)\n" * 1_000_000
lines_nb = "a 1\n" * 1_000_000
View app.rb
require 'sinatra'
require 'sculpt'
require 'sass'
t = template_doc do |includes, content|
head do
render includes
css "main.css"
title "Sculpt"
View to_proc.rb
# String#to_proc
# this can be used to evaluate a string to a proc.
class String
def to_proc
eval " do\n#{self}\nend"
# demo