Skip to content

Instantly share code, notes, and snippets.

@kraeml
kraeml / RK Test remote jupyter.ipynb
Created February 1, 2018 14:56
rdf/ais/remote jupyter/RK Test remote jupyter.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kraeml
kraeml / installer-config.txt
Last active May 8, 2017 12:21
RaspberryPi (minimal) unattended netinstaller snippets. First look at tree.txt. The file 'pi' is in __files/root/var/spool/cron/crontabs/pi__
hostname="pi3-xy"
username="pi"
userpw="login"
user_is_admin=1
wlan_country="DE"
wlan_ssid="gateway"
wlan_psk="SECRET"
packages="vim,python-minimal,apt-transport-https,debian-archive-keyring,ca-certificates,screen,tmux,git,pandoc,stow,tree"
firmware=1
@kraeml
kraeml / bind9
Last active March 29, 2017 08:45
Bind9 config snippets
# run resolvconf?
RESOLVCONF=no
# startup options for the server
OPTIONS="-4 -u bind"
---
# https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-16-04
- hosts: wp
become: yes
vars:
WP_DOMAIN: "wordpress.rdf.loc"
WP_PATH: "/var/www/html/wordpress"
tasks:
- name: Install software
@kraeml
kraeml / nb_remove_output.py
Created March 26, 2017 07:27 — forked from laurentperrinet/nb_remove_output.py
Remove output from Jupyter notebook from the command line
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Remove output from existing Jupyter Notebooks.
Modified from remove_output by Minrk, damianavila, gabraganca.
References:
[0]: https://github.com/jupyter/nbformat
[1]: http://nbformat.readthedocs.org/en/latest/index.html
[2]: http://blog.jupyter.org/2015/04/15/the-big-split/
from dbhelper import DBHelper
from flask import Flask
from flask import render_template
from flask import request
import json
import datetime
import dateparser
import string
<html>
<head>
<title>Schlagzeilen</title>
</head>
<body>
<h1>Schlagzeilen</h1>
<h2>Current weather</h2>
<p>City: <b>{{weather.city}}, {{weather.country}}</b></p>
<p>{{weather.description}} |{{weather.temperature}}&#8451;</p>
<form>
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import feedparser
from flask import Flask
from flask import render_template
from flask import request
import json
import urllib2
import urllib
#!/bin/bash
for i in $(find ~/.vagrant.d/ -iname master_id -exec ls {} \;)
do
VBoxManage unregistervm $(cat ${i}) --delete
rm ${i}
done
[
{
"title": "Pi MySQL",
"description": "The most popular open-source database",
"logo": "https://cloudinovasi.id/assets/img/logos/mysql.png",
"image": "hypriot/rpi-mysql:latest",
"env": [
{
"name": "MYSQL_ROOT_PASSWORD",
"label": "Root password"