Skip to content

Instantly share code, notes, and snippets.

View codepo8's full-sized avatar

Christian Heilmann codepo8

View GitHub Profile
@codepo8
codepo8 / transformvideo.js
Created January 18, 2011 16:02
A video player with zoom and rotate
/*
Zooming and rotating HTML5 video player
Homepage: http://github.com/codepo8/rotatezoomHTML5video
Copyright (c) 2011 Christian Heilmann
Code licensed under the BSD License:
http://wait-till-i.com/license.txt
*/
(function(){
/* predefine zoom and rotate */
<?php
function convertfilename($filename) {
$filename = str_replace([ "?", "[", "]", "/", "\\", "=", "<", ">",
":", ";", ",", "'", '"', "&", "$", "#",
"*", "(", ")", "|", "~" ], "", $filename);
$filename = preg_replace("/[\s-]+/", "-", $filename);
$filename = trim($filename, ".-_");
return ucwords($filename);
}
@codepo8
codepo8 / sort-on-4.md
Created July 11, 2024 13:30
Quick code challenge - sorting on four

How do you sort a list of words on the 4th character of the word? What"s the shortest solution?

[ "strawberry", "helicopter", "wales", "acorn" ]

should be:

@codepo8
codepo8 / Star challenge.md
Last active June 3, 2024 12:10
Chainlink CODE100 challlenge

Chainlink challenge

chainlink logo

Given a string s, where * represents a star…

Remove the star along with its closest non-star character to its left in a single operation.

The task is to perform this operation until all stars have been removed and to return the string that remains.

@codepo8
codepo8 / CODE100-bunt-statt-braun.md
Last active April 1, 2024 04:51
CODE100 "#BuntStattBraun" puzzle

CODE100 Challenge #BuntStattBraun

In this challenge you get an HTML document that renders a lot of colourful hearts.

pile of colourful hearts

And you get a JSON object with the information about all the brown colours that were used:

[
@codepo8
codepo8 / midjourney-ban-list.json
Created September 12, 2023 11:37
Midjourney banned words
{
"Gore": [
"Blood", "Bloodbath", "Crucifixion", "Bloody", "Flesh", "Bruises", "Car crash", "Corpse", "Crucified", "Cutting", "Decapitate", "Infested", "Gruesome", "Kill (as in Kill la Kill)", "Infected", "Sadist", "Slaughter", "Teratoma", "Tryphophobia", "Wound", "Cronenberg", "Khorne", "Cannibal", "Cannibalism", "Visceral", "Guts", "Bloodshot", "Gory", "Killing", "Surgery", "Vivisection", "Massacre", "Hemoglobin", "Suicide", "Female Body Parts"
],
"Drugs": [
"Drugs", "Cocaine", "Heroin", "Meth", "Crack"
],
"Clothing": [
"no clothes", "Speedo", "au naturale", "no shirt", "bare chest", "nude", "barely dressed", "bra", "risqué", "clear", "scantily", "clad", "cleavage", "stripped", "full frontal unclothed", "invisible clothes", "wearing nothing", "lingerie with no shirt", "naked", "without clothes on", "negligee", "zero clothes"
],