%title: Kubeception %author: @dghubble
// Youtube: https://www.youtube.com/watch?v=tlUiQa2JYQU
-> Experiments with QEMU/KVM on Kubernetes <-
(ns app | |
(:require [lifecycle :refer [combine parallel]])) | |
(defn components [app-config] | |
(combine (parallel (users-db/component) | |
(tasks-db/component)) | |
(rest-api/component app-config))) |
#!/bin/sh | |
# https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md | |
cpuinfo=`cat /proc/cpuinfo | grep "Revision"|awk -F': ' '{printf $2}'` | |
model=`cat /sys/firmware/devicetree/base/model` | |
case ${cpuinfo} in | |
"0002" ) | |
echo "Revision : 0002 (Model B Rev 1, 256MB)" ;; | |
"0003" ) |
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
;; For supporting more PG types, see https://github.com/remodoy/clj-postgresql | |
(ns pg-test.types | |
(:require [cheshire.core :as json] | |
[clojure.java.jdbc :as jdbc]) | |
(:import [org.postgresql.util PGobject] | |
[java.sql PreparedStatement])) | |
;; Writing | |
(defn- to-pg-json [data json-type] |
// | |
// Simplify.swift | |
// | |
// Simplification of a 3D-polyline. | |
// A port of https://github.com/hgoebl/simplify-java for Swift | |
// | |
// | |
// The MIT License (MIT) | |
// | |
// Created by Lachlan Hurst on 10/02/2015. |
#!/usr/bin/env python | |
""" Print all of the clone-urls for a GitHub organization. | |
It requires the pygithub3 module, which you can install like this:: | |
$ sudo yum -y install python-virtualenv | |
$ mkdir scratch | |
$ cd scratch | |
$ virtualenv my-virtualenv |
#include <stdio.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <termios.h> | |
/* | |
Simple program that sets stationary mode in U-Blox GPS connected to serial 0 on a Raspberry Pi 3 running Jessie. This | |
was not tested on any other system. This program assumes the GPS is using its default 9600 baud, 8 data bits, 1 stop bit, | |
and no parity. I'm using the expansion board from Uputronics. | |
This program worked for me when I set up my Pi as a stratum 1 NTP server per the directions on this |
This code now lives in its own repo at https://github.com/purcell/postgresql-migrations |
%title: Kubeception %author: @dghubble
// Youtube: https://www.youtube.com/watch?v=tlUiQa2JYQU
-> Experiments with QEMU/KVM on Kubernetes <-
;; SEE: https://github.com/cgrand/macrovich | |
;; macros and code in a single cljc working across clj, cljs and self-hosted cljs | |
;; require clojurescript from master | |
(ns foo.core | |
#?(:cljs (:require-macros | |
[net.cgrand.meta-macros :refer [macros no-macros]] | |
[foo.core :refer [add]]) | |
:clj (:require |