Skip to content

Instantly share code, notes, and snippets.

View danielduckworth's full-sized avatar

Daniel Duckworth danielduckworth

  • IEA
  • Melbourne, Australia
View GitHub Profile
@danielduckworth
danielduckworth / blockly-terminal.ipynb
Last active July 17, 2023 11:21
Jupyter iframe with Blockly Terminal
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@danielduckworth
danielduckworth / caddy-global.md
Last active January 22, 2024 05:22
Caddy global options

Global options🔗

The Caddyfile has a way for you to specify options that apply globally. Some options act as default values; others customize HTTP servers and don't apply to just one particular site; while yet others customize the behavior of the Caddyfile adapter.

The very top of your Caddyfile can be a global options block. This is a block that has no keys:

{
	...
}
sepal length (cm) sepal width (cm) petal length (cm) petal width (cm) target
5.1 3.5 1.4 0.2 Iris-setosa
4.9 3.0 1.4 0.2 Iris-setosa
4.7 3.2 1.3 0.2 Iris-setosa
4.6 3.1 1.5 0.2 Iris-setosa
5.0 3.6 1.4 0.2 Iris-setosa
5.4 3.9 1.7 0.4 Iris-setosa
4.6 3.4 1.4 0.3 Iris-setosa
5.0 3.4 1.5 0.2 Iris-setosa
4.4 2.9 1.4 0.2 Iris-setosa
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@danielduckworth
danielduckworth / on_startup.sh
Created June 6, 2023 23:33
Docker start up shell script
#!/bin/bash
# Write some commands here that will run on root user before startup.
# For example, to clone transformers and install it in dev mode:
# git clone https://github.com/huggingface/transformers.git
# cd transformers && pip install -e ".[dev]"
# on-my-zsh plugins
git clone https://github.com/zsh-users/zsh-autosuggestions \
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \
@danielduckworth
danielduckworth / README.md
Last active June 6, 2023 22:51
Ubuntu security checks

Ubuntu security tools

Lynis - This is a popular security auditing tool that can be used to scan your system for vulnerabilities and provide recommendations for improving security. It is available in the Ubuntu repositories and can be installed using the following command:

sudo apt-get install lynis

chkrootkit - This is a tool that checks for known rootkits on your system. It can be installed using the following command:

@danielduckworth
danielduckworth / colab_start.sh
Created June 6, 2023 18:39
Colab startup script
wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz
sudo tar xvzf ngrok-v3-stable-linux-amd64.tgz -C /usr/local/bin
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list && sudo apt update && sudo apt install ngrok
pip install jupyter_kernel_gateway
pip install torch -f https://download.pytorch.org/whl/cu113/torch_stable.html
pip install torchdata
pip install portalocker
pip install 'ludwig[full]'
# jupyter server password --generate-config
# echo "c.NotebookApp.password = u'sha1:${NOTEBOOK_PASSWORD}">>/root/.jupyter/jupyter_notebook_config.py
@danielduckworth
danielduckworth / rotten_tomatoes.yaml
Last active June 6, 2023 17:03
Sample ludwig taml model
input_features:
- name: genres
type: set
preprocessing:
tokenizer: comma
- name: content_rating
type: category
- name: top_critic
type: binary
- name: runtime
@danielduckworth
danielduckworth / .zshrc
Last active June 6, 2023 12:52
Zsh config
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# global devbox package manager
# eval "$(devbox global shellenv)"
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
@danielduckworth
danielduckworth / markdown-preview.less
Last active May 18, 2023 15:16
Styles for VS Code markdown preview enhanced extension.
/* Please visit the URL below for more information: */
/* https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */
@font-face {
font-family: 'Fira Code', monospace;
font-family: 'Fira Sans', sans-serif;
font-family: 'Inter', sans-serif;
src: url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
}