Skip to content

Instantly share code, notes, and snippets.

View martin-braun's full-sized avatar
♠️

Martin Braun martin-braun

♠️
View GitHub Profile
@martin-braun
martin-braun / steady.lua
Last active August 17, 2018 09:50 — forked from pablomayobre/steady.lua
Fixed time step love.run
--MIT License
--Copyright (c) 2018 Arvid Gerstmann, Jake Besworth, Max, Pablo Mayobre, LÖVE Developers
--Original author: https://github.com/Leandros
--Max frame skip: https://github.com/jakebesworth
--Manual garbage collection: https://github.com/Geti
--Put it all together: https://github.com/Positive07
--Ported to 10.0.2: https://github.com/MartyMaro/
--Original love.run: LÖVE Developers
@ECHO OFF
ECHO Press any key to PARTY ...
PAUSE>NUL
CLS
SET COLORS=1 2 3 4 5 6 7 8 9 A B C D E F
FOR /L %%N IN () DO (
FOR %%A IN (%COLORS%) DO (
COLOR %%A0
)
)
@martin-braun
martin-braun / main.lua
Created January 18, 2020 21:03
Shape transformer experiment using LÖVE
local x, y = 400, 300
local lineLength = 150
local rotationChange = -0.003
function rotateAround(x1, y1, x2, y2, r)
local c, s = math.cos(r), math.sin(r)
return c * (x1 - x2) - s * (y1 - y2) + x2, s * (x1 - x2) + c * (y1 - y2) + y2 -- rotate x1,y1 around x2,y2 by r
end
local c, curR, addR
@martin-braun
martin-braun / main.lua
Created January 19, 2020 04:21
Pulsing Shapes using the LÖVE framework
local lg, lt = love.graphics, love.timer
local pi, cos, sin = math.pi, math.cos, math.sin
local centerX, centerY = 400, 300
local wave = 0
-- rotate x,y around xRef,yRef by r
function rotateAround(x, y, xRef, yRef, r)
local c, s = cos(r), sin(r)
return c * (x - xRef) - s * (y - yRef) + xRef, s * (x - xRef) + c * (y - yRef) + yRef
end
@martin-braun
martin-braun / gpm
Last active August 17, 2021 23:00
gpm - Lightweight Git Package Manager
#!/bin/bash
me=`basename "$0"`
if [[ -z $1 || $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: $me <op[ install | i | update | u | force_update | fu | uninstall | un | list | l ]?> <source_platform[ github | gitlab ]> <source_name[ <author,groups>/<repo_name> ]> <protocol[ https | ssh ]?>"
else
op="$1"
force=0
if [[ $op == "force_update" || $op == "fu" ]]; then
op="u"
@martin-braun
martin-braun / xcloner-ea366.log
Last active November 26, 2021 17:39
xcloner-log
This file has been truncated, but you can view the full file.
[2021-11-21 02:30:37] xcloner_scheduler.INFO: New schedule hash is -a7718 [] []
[2021-11-21 02:30:37] xcloner_scheduler.INFO: Starting backup profile 'Tägliches Backup' ["CRON"] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Starting the filesystem scanner on root folder /homepages/25/d4295016535/htdocs/my-homepage-com [] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Adding .htaccess to the filesystem list ["FILESYSTEM SCAN","INCLUDE"] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Adding index.php to the filesystem list ["FILESYSTEM SCAN","INCLUDE"] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Adding license.txt to the filesystem list ["FILESYSTEM SCAN","INCLUDE"] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Adding liesmich.html to the filesystem list ["FILESYSTEM SCAN","INCLUDE"] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Adding php.ini to the filesystem list ["FILESYSTEM SCAN","INCLUDE"] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Adding readme.html to the filesystem
@martin-braun
martin-braun / 00default-release
Created February 21, 2022 22:19 — forked from khimaros/00default-release
debian testing with automatic security updates from unstable
APT::Default-Release "testing";
@martin-braun
martin-braun / bootstrap.model.wrapper.js
Created February 25, 2022 17:16
bootstrap.model.wrapper.js
window.showBSModal = function self(options) {
var options = $.extend({
title : '',
body : '',
remote : false,
backdrop : 'static',
size : false,
onShow : false,
onHide : false,
@martin-braun
martin-braun / .stglobalignore
Last active June 30, 2023 03:37 — forked from jult/.stglobalignore
syncthing ignore file(s) .stglobalignore and .stignore
// .stglobalignore
// These prevent SyncThing from trying to sync data that's locked, constantly changing, going to be thrown out, unimportant, etc.
// Lots of conflicts/issues disappeared using these ignores, but do check to prevent major disappointment!
// *.log and *cache* are in there, just so you know.. but firefox' startupCache and offlineCache will be synced.
// Decided to stop categorizing these. Sorting them Lexicographically from now on. Ignores are case sensitive.
$RECYCLE.BIN
$WINDOWS.~BT
*.!Sync
@martin-braun
martin-braun / curl_wget_test.sh
Last active January 8, 2023 12:01
curl_wget_test.sh
#!/usr/bin/env bash
hello() {
echo Hello World!
}
echo It worked!
echo ''
echo Arguments: $@