Skip to content

Instantly share code, notes, and snippets.

@rockerBOO
rockerBOO / docker-conflict.md
Last active February 21, 2018 18:52
Containers, Images in docker

Error: Conflict, * wasn't deleted

Recently trying out docker and was playing with Dockerfile. I ran my Dockerfile a few times and it made a few containers for the different build tries.

sudo docker build -t rockerboo/web .

docker images

REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
@rockerBOO
rockerBOO / how-to-backup-docker-volume-volumerize.md
Last active October 4, 2023 22:43
How to backup a Docker volume using Volumerize

How to backup a Docker Volume

Docker supports volumes for storing data across containers. This also allows us to mount the volume in a docker container to backup this volume. Using Volumerize we can mount our volume and back it up to a separate volume or many backend options.

Volumerize is a docker container that can attach your docker volumes and backup the files of the volume. It does this with a cronjob in the container or runs manually.

Volumerize uses Duplicity to make the actual backup. Supports many backup backend options like S3, Dropbox, and the local file system.

@rockerBOO
rockerBOO / Tippy.js
Last active June 13, 2019 18:36
Trying to manage instances and ref in React with Tippy without creating new react components.
import React from 'react'
import useTippy from './useTippy.js'
const Example = () => {
const [tippyInstance, tippyElementRef] = useTippy({content: 'Test'})
return <div>
<span ref={tippyElementRef}>Tippy</span>
</div>
}
@rockerBOO
rockerBOO / whatthefont.js
Created October 11, 2019 15:57 — forked from matthewmayer/whatthefont.js
paste this into Javascript console to see what fonts are being used
function walk(node) {
// I stole this function from here:
// http://is.gd/mwZp7E
var child, next;
var tagName = node.tagName ? node.tagName.toLowerCase() : "";
if (tagName == 'input' || tagName == 'textarea') {
return;
}
impl From<&str> for Person {
fn from(s: &str) -> Person {
match s.split(",").collect() {
[age, name] => Person {
age
name
},
_ -> Person::default()
}
}
-- Thanks @tjdevries !
-- neovim
-- Complete matching lines
-- See :help ins-completion
function CompleteMatchingLine()
local current_line = vim.api.nvim_get_current_line()
current_line = vim.trim(current_line)
if not current_line then
-- Very simple file logger for lua
-- local log = log_to_file('mylogfile.log')
-- log('my string')
local log_to_file = function(logfile)
return function(log)
local file = io.open(logfile, "a")
if not file then return end
file:write(log .. "\n")
file:close()
@rockerBOO
rockerBOO / build.sh
Created November 27, 2022 20:48
Example running sound effect based on the exit code of a command. Customize to taste.
#!/usr/bin/env bash
success_sound="$HOME/code/audio-player/creamy2.ogg"
failure_sound="$HOME/code/audio-player/output.ogg"
# https://github.com/rockerBOO/audio-player
player="$HOME/code/audio-player/target/release/audio-player"
cargo build "$@"
last_run=$?
@rockerBOO
rockerBOO / aesthetic.txt
Created December 18, 2022 18:39
A list of aethetics (may be NSFW)
cloudcore
ulzzang
70's disco
2-tone
1950's suburbia
2000's autmn
2014 girly tumblr
2k animecore
Abstract Tech
Acid Pixie
@rockerBOO
rockerBOO / skybox_styles.txt
Last active April 18, 2023 17:19
Skybox styles
5 Digital Painting
2 Fantasy Lands
3 Anime Art Style
4 Surreal Style
6 Scenic
9 Realistic
20 Modern Computer Animation
10 SciFi
11 Dreamlike
15 Interior Views