Skip to content

Instantly share code, notes, and snippets.

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

Martin Braun martin-braun

♠️
View GitHub Profile
@hieblmedia
hieblmedia / .gitignore
Last active September 11, 2024 13:03
Gitignore - Exclude all except specific subdirectory
#
# If all files excluded and you will include only specific sub-directories
# the parent path must matched before.
#
/**
!/.gitignore
###############################
# Un-ignore the affected subdirectory
@0xjac
0xjac / private_fork.md
Last active November 15, 2024 13:06
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@Phlow
Phlow / favicon.sh
Last active September 18, 2024 13:26
Favicon Generator: Generate favicons on Mac OSX via bash/shell with the help of sips command. Than optimize the images with ImageOptim (App)
#!/bin/sh
#
# Dieses Script fragt nach einer Bildatei, die dann in die
# verschiedenen Favicon-Größen mittels sips-Kommandos
# umgewandelt werden. Ist auf dem Rechner das Programm
# ImageOptim installiert, dann werden die Bilddateien
# anschließend verlustlos optimiert.
# Farbvariablen für formatierte Ausgabe
reset='\033[0m'
@pablomayobre
pablomayobre / batch.lua
Last active December 22, 2018 01:11
Perform many removal, inserting operations on a table, fast!
local batch = {}
local holes_err = "bad argument #%s to function '%s' (this list doesn't support holes)"
local refill = function (t, ...)
local newn = select('#', ...)
local length = math.max(newn, (t.n or #t))
for i = 1, length do
t[i] = select(i, ...)
@bobpaul
bobpaul / gnu_getopt_example.sh
Created March 20, 2018 18:24
An example showing how to use getopt
#!/usr/bin/env bash
# Time-stamp: <2017-04-27 09:57:21 kmodi>
# Time-stamp: <2018-03-20 12:58:02 bobpaul>
# derived from kmodi's gist: https://gist.github.com/kaushalmodi/74e9875d5ab0a2bc1010447f1bee5d0a
#
# Example of using getopt to parse command line options
# http://stackoverflow.com/a/29754866/1219634 Limitation: All the options
# starting with - have to be listed in --options/--longoptions, else getopt will
# error out.
# The downside is that if you intend to use this as a wrapper to some other program,
@ve3
ve3 / Encryption.js
Last active August 10, 2023 10:51
Encrypt and decrypt between programming languages (PHP & JavaScript). (Newer version here https://gist.github.com/ve3/b16b2dfdceb0e4e24ecd9b9078042197 )
/**
* Encryption class for encrypt/decrypt that works between programming languages.
*
* @author Vee Winch.
* @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference.
* @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here.
*/
class Encryption {
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active November 14, 2024 06:21
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@pablomayobre
pablomayobre / steady.lua
Last active May 22, 2020 07:37
Fixed time step love.run
--MIT License
--Copyright (c) 2019 Arvid Gerstmann, Jake Besworth, Max Cahill, 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
--Original love.run: LÖVE Developers
local conf = {
@1bardesign
1bardesign / typewriter_demo.lua
Created October 5, 2018 07:03
a simple line by line "typewriter" text demo for love2d
--[[
typewriter class
]]
local typewriter = {}
--(metatable used for instances, don't worry about it too much
-- but do read up on metatables at some point)
typewriter._mt = {__index = typewriter}
--create a new typewriter
@Gerrilicious
Gerrilicious / App.jsx
Created February 7, 2019 12:01
React Router animation with typescript and Pose
// Libraries
import * as React from "react";
import posed, { PoseGroup } from 'react-pose';
import { Route, Switch, BrowserRouter } from "react-router-dom";
// Layout
import Layout from "./Layout";
// Components
import Dashboard from "./components/dashboard/Dashboard";