Skip to content

Instantly share code, notes, and snippets.

View tstelzer's full-sized avatar

Timm Stelzer tstelzer

View GitHub Profile
@pokorson
pokorson / actions.js
Last active August 2, 2017 13:04
Simple api middleware for redux
export const fetchTransactions = () => {
return {
type: "API_FETCH",
config: {
type: ACTIONS.FETCH_TRANSACTIONS,
action: () => axios.get(/* sample url */),
transform: response => response.data.result,
},
};
};
#!/usr/bin/env bash
# Installs NixOS on a Hetzner server, wiping the server.
#
# This is for a specific server configuration; adjust where needed.
#
# Prerequisites:
# * Update the script to adjust SSH pubkeys, hostname, NixOS version etc.
#
# Usage:
version: '3'
services:
frontproxy:
image: traefik
command: --api --docker
ports:
- "80:80"
- "443:443"
volumes:
@markerikson
markerikson / redux-thunk-examples.js
Last active September 4, 2022 11:12
Redux-Thunk examples
// The classic AJAX call - dispatch before the request, and after it comes back
function myThunkActionCreator(someValue) {
return (dispatch, getState) => {
dispatch({type : "REQUEST_STARTED"});
myAjaxLib.post("/someEndpoint", {data : someValue})
.then(
response => dispatch({type : "REQUEST_SUCCEEDED", payload : response}),
error => dispatch({type : "REQUEST_FAILED", error : error})
);
@wayspurrchen
wayspurrchen / git patterns.md
Last active January 18, 2023 21:38
Useful Git Techniques

History

Show file at certain commit

git show <hash>:<file>

Show history of a file

git log -p <filename>

@leighman
leighman / Main.purs
Last active April 9, 2023 18:21 — forked from oxbowlakes/3nightclubs.scala
A Tale of 3 Nightclubs
module Main where
import Prelude
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (CONSOLE, logShow)
import Data.Either (Either(..))
import Data.Foldable (elem, notElem)
import Data.Int (toNumber)
import Data.Traversable (traverse)
import Data.Validation.Semigroup (invalid)
@tstelzer
tstelzer / puml-theme-kauz-light.puml
Created August 24, 2023 09:57
plant-uml-theme-kauz-light
!$THEME = "kauz-light"
!define C_WHITE #ffffff
!define C_GRAY1 #f0f0f0
!define C_GRAY2 #e1e1e1
!define C_GRAY3 #d2d2d2
!define C_GRAY4 #c3c3c3
!define C_GRAY5 #b4b4b4
!define C_GRAY6 #a5a5a5
!define C_GRAY7 #969696
@reborg
reborg / rich-already-answered-that.md
Last active May 8, 2024 14:20
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content

@martijnvermaat
martijnvermaat / nixos.md
Last active May 9, 2024 01:11
Installation of NixOS with encrypted root
@alirobe
alirobe / reclaimWindows10.ps1
Last active May 15, 2024 14:23
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###