Skip to content

Instantly share code, notes, and snippets.

# TIL: Rotate a list of strings (e.g. multi line string)
"""
lines = [
'[B] [N] [H]',
'[V] [P] [T] [V] [P]',
'[W] [C] [T] [S] [H] [N]',
'[T] [J] [Z] [M] [N] [F] [L]',
'[Q] [W] [N] [J] [T] [Q] [R] [B]',
'[N] [B] [Q] [R] [V] [F] [D] [F] [M]',
@davur
davur / dots.svg
Created November 11, 2022 01:53
Dots background SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env bash
# This script must be sourced from within a shell
# and not executed. For instance with:
#
# . path/to/script/workon.sh
function workon() {
curdir=${PWD##*/} # to assign to a variable
curdir=${curdir:-/} # to correct for the case where PWD=/
@davur
davur / svg
Created August 10, 2022 12:58
SVG using recurring pattern
<svg viewbox="0 0 1182 422" fill="none" xmlns="http://www.w3.org/2000/svg" >
<defs>
<pattern id="the-dots" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse">
<path d="M0 0H2V2H0V0Z" fill="#25D0AB" />
</pattern>
</defs>
<rect x="0" y="0" width="100%" height="100%" fill="url(#the-dots)"></rect>
</svg>
@davur
davur / pyconau-programme-enricher.js
Last active August 29, 2015 14:26
PyConAU 2015 - Load all talk abstracs into the programme page
// Licence: Do with this as you see fit. All copyright released
// Author: Davur Clementsen (Twitter @davur, I love feedback)
// Load all talk abstracs into the programme page.
//
// Try out when viewing the PyConAu schedule for Saturday and Sunday:
// - http://2015.pycon-au.org/programme/schedule/Saturday
// - http://2015.pycon-au.org/programme/schedule/Sunday
//
// How to use: