Skip to content

Instantly share code, notes, and snippets.

View dvbportal's full-sized avatar

Hans J Schroeder dvbportal

View GitHub Profile

Sama: Today we have Elon Musk. Elon, thank you for joining us.

Elon: Thanks for having me.

Sama: So, we want to spend the time today talking about your view of the future and what people should work on. To start off, could you tell us, you famously said, when you were younger, there were five problems that you thought were most important for you to work on. If you were 22 today, what would the five problems that you would think about working on be?

Elon: Well, first of all, I think if somebody is doing something that is useful to the rest of society, I think that's a good thing. Like, it doesn't have to change the world. If you make something that has high value to people... And frankly, even if it's something, if it's like just a little game or some improvement in photo sharing or something, if it has a small amount of good for a large number of people, I think that's fine. Stuff doesn't need to change the world just to be good. But in terms of things that I think are most like to affect t

@dvbportal
dvbportal / coreos-docker-veertu.md
Last active June 11, 2016 19:09 — forked from ilja/coreos-docker-veertu.md
How to connect Docker to CoreOS in Veertu

Keybase proof

I hereby claim:

  • I am dvbportal on github.
  • I am hschroeder (https://keybase.io/hschroeder) on keybase.
  • I have a public key whose fingerprint is F907 E8BD EEF2 0735 B8B5 0C13 9EAB 9FC5 E745 BC63

To claim this, I am signing this object:

haproxy.conf
============
frontend spdy
mode tcp
bind xxx.xxx.xxx.xxx:443 ssl crt /etc/haproxy/ssl.pem crt /etc/haproxy/certs.d npn spdy/3.1,http/1.1 ciphers AES256+EECDH:AES256+EDH:AES128+EDH:EECDH:!aNULL:!eNULL:!LOW:!DES:!3DES:!RC4; no-sslv3
option tcplog
log global
# route to nginx
@dvbportal
dvbportal / csv2json.py
Created January 22, 2014 18:50
CSV to JSON conversion (in Python)
import csv
import json
csvfile = open('DE.txt', 'r')
jsonfile = open('de.json', 'w')
fieldnames = ("countryCode","postalCode","placeName","adminName1","adminCode1","adminName2","adminCode2","adminName3","adminCode3","latitude","longitude","accuracy")
reader = csv.DictReader(csvfile, fieldnames, delimiter='\t')
jsonfile.write("{ \"docs\": [")
@dvbportal
dvbportal / todo.md
Created January 3, 2014 17:41
Sample Todo List

To Do

  • for an empty checkbox
  • for a checked checkbox
@dvbportal
dvbportal / app.rb
Last active December 30, 2015 13:09 — forked from troelskn/app.rb
require 'gollum/app'
require 'digest/sha1'
class App < Precious::App
User = Struct.new(:name, :email, :password_hash, :can_write)
before { authenticate! }
before /^\/(edit|create|delete|livepreview|revert)/ do authorize_write! ; end
helpers do
@dvbportal
dvbportal / redis-counters.js
Created February 5, 2012 12:30
Storing Counters In Redis
// Additional code in node-http-proxy.js
var crypto = require('crypto');
var redis = require('redis');
var client = redis.createClient(config.opt.redis_port, 'cloudno.de');
client.auth(config.opt.redis_auth, function(result) {
util.log("Redis authenticated.");
})
@dvbportal
dvbportal / two_factor_ssh.rb
Created September 24, 2011 12:51 — forked from moomerman/two_factor_ssh.rb
Two Factor SSH Authentication
#!/usr/bin/env ruby
require 'rubygems'
require 'rotp'
require 'time'
user = ..hard coded..
secret = ..hard coded..
abort unless user and secret
Connection=Keep-Alive
Accept-Encoding=gzip, deflate
Accept-Language=en-us
X-Forwarded-Host=http-echo.jgate.de
User-Agent=Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10
Accept=application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Host=http-echo.jgate.de
X-Forwarded-Server=jgate.de
X-Forwarded-For=84.62.202.106