Skip to content

Instantly share code, notes, and snippets.

View gorbiz's full-sized avatar
😺
Found a paper bag

Karl Svartholm gorbiz

😺
Found a paper bag
  • Gothenburg, Sweden
View GitHub Profile
@gorbiz
gorbiz / person.py
Created December 8, 2023 18:40
Realistic example of local variable in python constructor
class Person:
def __init__(self, full_name):
# 'name_parts' is a local variable, only used within the constructor
name_parts = full_name.split()
self.first_name = name_parts[0]
self.last_name = name_parts[-1] if len(name_parts) > 1 else ''
def display_name(self):
print(f"First Name: {self.first_name}, Last Name: {self.last_name}")
@gorbiz
gorbiz / index.html
Last active December 8, 2023 14:47
Log lady minimal core
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Log App</title>
<style>
body { font-family: Arial, sans-serif; }
.container { width: 300px; margin: 0 auto; padding-top: 20px; }
input { margin-top: 10px; width: 100%; }
ul { padding: 0; }
@gorbiz
gorbiz / README.md
Last active October 24, 2023 17:22
The Brain --> Obsidian vault (symlink)

What is this?

You can open your Brain folder in Obsidian but the file / folder names tells you nothing.

This script links markdown files, to transform:

./3c86000e-71a3-4253-9575-d798c8809929/Notes.md
./1e0d10d1-be54-524c-9504-0f28568a1931/Notes.md
./d9b80a07-8449-5e5d-948d-b3070242f149/Notes.md
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "https://www.w3.org/TR/html4/strict.dtd">
<!-- saved from url=(0095)https://mail.google.com/mail/u/0?ui=2&ik=3064bec29c&view=lg&permmsgid=msg-f:1685985615417531410 -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" nonce="">
body,
td,
div,
@gorbiz
gorbiz / index.html
Last active May 10, 2018 09:58
Playing with svg...
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<style media="screen">
html, body { margin:0; padding:0; overflow:hidden }
svg { position:fixed; top:0; left:0; height:100%; width:100% }
body { background: #2a2030; }
.controls {
@gorbiz
gorbiz / Dockerfile
Created February 27, 2018 06:57
Multi-stage build for vue front-end
FROM node:8.9.4-alpine AS build_box
WORKDIR /app
COPY package*.json ./
RUN NODE_ENV=dev npm install
COPY . /app
RUN npm run build
# Make final image
FROM node:8.9.4-alpine
@gorbiz
gorbiz / Dockerfile
Created October 24, 2017 16:52
CILAMP docker example
# example usage:
# docker build -t lamp .
# docker run -e LAMPID=mylampID -e TEST_CMD='date +%S | grep 1' -e TEST_INTERVAL=60 lamp
FROM alpine
RUN set -ex; \
apk update; \
apk add bash; \
apk add curl
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<input id="color" type="color" value="#ff0000" />
@gorbiz
gorbiz / init.coffee
Last active March 8, 2016 08:41
HACK - atom (editor) - render Jade on change
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@gorbiz
gorbiz / ipa.md
Created March 6, 2016 05:51
IPA Chart by Arthaey

Vowels

Front Near-front Central Near-back Back
Close i y ɨ ʉ ɯ u
Near-close ɪ ʏ ɪ̈ ʊ̈ ʊ
Close-mid e ø ɘ ɵ ɤ o
Mid e̞ ø̞ ə ɵ̞ ɤ̞ o̞
Open-mid ɛ œ ɜ ɞ ʌ ɔ
Near-open æ ɐ