Skip to content

Instantly share code, notes, and snippets.

View rolfst's full-sized avatar

Rolf Strijdhorst rolfst

View GitHub Profile
@rolfst
rolfst / parallelTaskEither.ts
Created April 30, 2024 08:20
This Gist merges the outcome of all the parallel TaskEithers into 1 Result
import {
pipeable as P,
taskEither as TE,
apply as AP,
task as T,
array as A,
either as E
} from "fp-ts";
import { getMonoid } from "fp-ts/lib/Array";
type Result = number;
const { models: modelUtils } = require('strapi-utils')
const uploadFiles = require('strapi/lib/services/utils/upload-files')
const convertRestQueryParamsForAggregate = require('../../../config/functions/convertRestQueryParamsForAggregate')
const forwardResult = require('../../../lib/forwardResult')
const NotFoundError = require('../../../lib/NotFoundError')
const { getModelAttributes, toProjectionSettings } = require('../../../lib/projectKeyUtils')
const { getParticipants } = require('./rules/reactions')
const rtracer = require('cls-rtracer')

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@rolfst
rolfst / default.pp
Last active August 29, 2015 14:05
my puppet manifest for provioning the box with an php environment
Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ] }
class system-update {
exec { 'apt-get update':
command => 'apt-get update',
}
$sysPackages = [ "build-essential", "git", "mercurial", "curl", "augeas-tools", "unzip", "unrar" ]
package { $sysPackages:
ensure => "installed",
require => Exec['apt-get update'],
@rolfst
rolfst / extra.sh
Created August 13, 2014 07:15
adds puppet to provisioning for vagrant
apt-get update >/dev/null
# Install wget if we have to (some older Ubuntu versions)
echo "Installing wget..."
apt-get install -y wget >/dev/null
# Install the PuppetLabs repo
echo "Configuring PuppetLabs repo..."
repo_deb_path=$(mktemp)
wget --output-document=${repo_deb_path} ${REPO_DEB_URL} 2>/dev/null
<div >
Connector
<div class="menuSelect">{{ api.name }}</div>
</div>
@rolfst
rolfst / start_web
Created December 16, 2013 09:49
Starts an virtualenv in projectmode using tmux
#! /bin/bash
read -p "project: " proj
echo $proj
tmux has-session -t $proj
if [ $? != 0 ]
then
tmux -2 new -s $proj -d
tmux neww -t $proj:1 -n 'editor'
tmux send-keys -t $proj "cd ~/projects/web/$proj/" C-m
@rolfst
rolfst / initiate_web
Created December 16, 2013 09:32
upstart for a project. This installs an isolated environment for python and node.js. It also installs either Yeoman or Brunch for your web projects workflow
#! /bin/bash
############################################################################
# this script depends on an installed virtualenvwrapper it makes use of
# a virtualenv (python) to create an isolated node.js environment
############################################################################
echo -n "workon home dir " dir
read dir
export WORKON_HOME=$dir
source /usr/local/bin/virtualenvwrapper.sh
export export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'