Skip to content

Instantly share code, notes, and snippets.

View on3iro's full-sized avatar
👁️‍🗨️

Theo Salzmann on3iro

👁️‍🗨️
View GitHub Profile
@on3iro
on3iro / configureStore.ts
Last active December 8, 2021 15:03
december 2021 redux training
import { applyMiddleware, createStore } from 'redux'
import thunkMiddleware from 'redux-thunk'
import { composeWithDevTools } from 'redux-devtools-extension'
import { postReducer } from './posts/posts'
import { combineReducers } from '@reduxjs/toolkit'
export function configureStore() {
const middlewares = [thunkMiddleware]
const middlewareEnhancer = applyMiddleware(...middlewares)
version: "3"
services:
nextcloud:
image: nextcloud:21.0.3-apache
restart: always
volumes:
- ./nextcloud:/var/www/html
environment:
- VIRTUAL_HOST=localhost
{
"name": "The New Age",
"bigPocketVariantConfig": true,
"sequenceConfig": {
"firstBranchId": "NA-Ex-02-FRONT",
"branches": {
"NA-Ex-02-FRONT": {
"type": "narrative",
"config": {
"text": "It has been a week since Commander Soskel, one of New Gravehold's most decorated breach mages, led an expedition to the north. They were scheduled to return days ago, and the Council fears the worst. You are called upon to go after them. The loss of good mages is already painful enough, they explain, but Soskel and his party carried some of New Gravehold's rarest and most powerful artifacts. No matter what, you must find and return these treasures. You gather your gear and set out at once. The familiar trails of New Greavehold slowly give way to swampland. The air is muggy and thick in your lungs. You feel a strange sensation of being watched. You scan the dense underbrush and notice movement as someone turns and flees. Without hesitation, you chase them deeper into the swamp. So
@on3iro
on3iro / convert.js
Created January 31, 2018 07:13
Converting a number to a formatted string
// @flow
/**
* Adds a separator between triples of numbers.
* For examples have a look at the test suite
*/
export const addThousands = (numString: string, separator: string = '.'): string => {
const re = /\d(?=(?:\d{3})+(?!\d))/g
const convert = (match = numString.search(re), acc = numString) => {
@on3iro
on3iro / post-merge
Created August 13, 2017 05:03 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#!/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@on3iro
on3iro / tmux-cheatsheet.markdown
Created August 12, 2017 08:02 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname