Skip to content

Instantly share code, notes, and snippets.

@dfletcher
dfletcher / mybartiksub.info.yml
Created October 7, 2019 14:38
Drupal 8 Quick Bartik subtheme
name: My Bartik subtheme
type: theme
core: 8.x
base theme: bartik
description: 'Bartik subtheme.'
alt text: 'Bartik subtheme.'
libraries:
- 'mybartiksub/theme'
@dfletcher
dfletcher / core.clj
Last active December 3, 2018 23:08
JavaFX Clojure app template
(ns myapp.core (:gen-class))
(gen-class
:name myapp.Application
:extends javafx.application.Application
:prefix "myapp-")
(defn ^:Private myapp-start
"Implements javafx.application.Application.start."
[app ^javafx.stage.Stage stage]
@dfletcher
dfletcher / tsws
Last active July 21, 2018 12:47
Totally simple web server using Bash and netcat (nc)
Moved to a proprer repositoy, TSWS is a real boy now!
https://github.com/dfletcher/tsws
PRs welcomed.
a = [1, 2, 3, 4]
for x in range(0, len(a), 2):
pair = a[x:x+2]
print(pair)
... or individually ...
for x in range(0, len(a), 2):
print(str(a[x]) + ', ' + str(a[x+1]))