Skip to content

Instantly share code, notes, and snippets.

View thecocce's full-sized avatar

TheCocce thecocce

View GitHub Profile
@thecocce
thecocce / README.md
Created February 26, 2025 17:00 — forked from JohannesDeml/README.md
Batch convert images with inkscape on windows

Batch convert svg|pdf|eps|emf|wmf|ai|ps|cdr to eps|pdf|png|jpg|tiff|svg|ps|emf|wmf

Screenshot Batch converter for Windows using Inkscape with the command line
InkscapeBatchConvert is an easy to use solution to quickly convert all files of a folder to another type without the need to open Inkscape. The program uses Windows Batch scripting and will only work on Windows.
Tested with Inkscape 1.0.x - 1.3.x ✅ (The last version that supports Inkscape 0.9.x can be found here)

Usage

  1. Download _InkscapeBatchConvert.bat
  2. Put it in the folder where you have files you wish to convert (will also scan on all subfolders for files of input type).
  3. Then double click the file to start it.

Generating Procedural Game Worlds with Wave Function Collapse

Wave Function Collapse (WFC) by @exutumno is a new algorithm that can generate procedural patterns from a sample image. It's especially exciting for game designers, letting us draw our ideas instead of hand coding them. We'll take a look at the kinds of output WFC can produce and the meaning of the algorithm's parameters. Then we'll walk through setting up WFC in javascript and the Unity game engine.

sprites

The traditional approach to this sort of output is to hand code algorithms that generate features, and combine them to alter your game map. For example you could sprinkle some trees at random coordinates, draw roads with a brownian motion, and add rooms with a Binary Space Partition. This is powerful but time consuming, and your original vision can someti

@thecocce
thecocce / main.dart
Created August 29, 2022 13:14 — forked from av/main.dart
Flutte: magic
import 'dart:math';
import 'dart:ui';
import 'package:flutter/material.dart';
void main() async {
runApp(MyApp());
}
/// Represents some additional [Color]s to be used
/// across the application
@thecocce
thecocce / SORTTHDS.PAS
Created November 2, 2021 18:15 — forked from jpluimers/SORTTHDS.PAS
Delphi multi threading demo by Bob Ainsbury and Ray Konopka from BorCon95 shipping with Delphi 2
unit SortThds;
interface
uses
Classes, Graphics, ExtCtrls;
type
{ TSortThread }
@thecocce
thecocce / .. MediaCreationTool.bat ..md
Created October 5, 2021 18:05 — forked from AveYo/.. MediaCreationTool.bat ..md
Universal MediaCreationTool wrapper for all MCT Windows 10 versions from 1507 to 21H1 with business (Enterprise) edition support

Not just an Universal MediaCreationTool wrapper script with ingenious support for business editions,
Preview
A powerful yet simple windows 10 / 11 deployment automation tool as well!

configure via set vars, commandline parameters or rename script like iso 21H2 Pro MediaCreationTool.bat
recommended windows setup options with the least amount of issues on upgrades already set
awesome keyboard focus dialogs to pick windows version and enhanced preset action

Auto Setup for upgrading directly with the auto-detected Edition, Language, Architecture *
- can troubleshoot auto setup failing by adding no_update to script name

@thecocce
thecocce / break-short.c
Created August 28, 2021 22:24 — forked from jhoenicke/break-short.c
Program to brute force private keys from public keys using the baby-step giant-step algorithm.
/**********************************************************************
* Copyright (c) 2017, Jochen Hoenicke *
* *
* Compile with: *
* gcc -O2 -I secp256k1/src/ -I secp256k1/ break_short.c -lgmp *
**********************************************************************/
#include "libsecp256k1-config.h"
#include <stdio.h>
@thecocce
thecocce / PerspectiveImage.hx
Created December 25, 2019 17:50 — forked from andyli/PerspectiveImage.hx
Draw distorted image like perspective transform.
//Ported from the work of Zeh:
//http://zehfernando.com/2010/the-best-drawplane-distortimage-method-ever/
import flash.display.BitmapData;
import flash.display.Graphics;
import flash.geom.Point;
import flash.Vector;
class PerspectiveImage {
/**
@thecocce
thecocce / New-Password.ps1
Created November 5, 2019 23:09 — forked from indented-automation/New-Password.ps1
PowerShell random password generator.
function New-Password {
<#
.SYNOPSIS
Generate a random password.
.DESCRIPTION
Generate a random password.
.NOTES
Change log:
27/11/2017 - faustonascimento - Swapped Get-Random for System.Random.
Swapped Sort-Object for Fisher-Yates shuffle.
@thecocce
thecocce / AStarSearch.cs
Created September 29, 2019 18:22 — forked from keithcollins/AStarSearch.cs
A* pathfinding implementation for Unity 5, C#
using UnityEngine;
using System.Collections.Generic;
using System.Collections;
// This script is adapted from these,
// but has been heavily modified in some areas:
// http://www.redblobgames.com/pathfinding/a-star/implementation.html#csharp
// https://gist.github.com/DanBrooker/1f8855367ae4add40792
// I'm continuing to optimize and change things here. I would not use this
@thecocce
thecocce / docker-destroy-all.sh
Created August 21, 2019 09:49 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
if [ -n "$containers" ]; then
docker rm -f -v $containers