Skip to content

Instantly share code, notes, and snippets.

View tvaliasek's full-sized avatar

Tomáš Valiašek tvaliasek

View GitHub Profile
@tvaliasek
tvaliasek / gulpfile.js
Created January 15, 2019 22:33
Gulp 4 - PostCSS wait for SASS compiler to write output files (File not found with singular glob)
/*
After migration to Gulp 4 and rewrite of gulpfile I have found out that gulp-sass plugin cannot
write compiled css files to disk before his task is resolved, even if the task is run in series()
call, causing unmatched glob pattern error. Usage of src(globs, { allowEmpty: true }) is not a
solution, because task must be run twice in order to output correct file.
..after few hours of despair and googling
*/
const { series, dest, src } = require('gulp')
@tvaliasek
tvaliasek / nextras.tempusdominus.init.js
Last active January 17, 2019 13:57
Nextras Forms tempus dominus datetime picker init
/**
* This file is part of the forked Nextras community extensions of Nette Framework
*
* @license MIT
* @link https://github.com/nextras/forms
* @author Jan Skrasek
* @author Tomas Valiasek
*/
// main init function, function is appended to $.fn
@tvaliasek
tvaliasek / nats-install.sh
Created November 27, 2023 19:33
Install nats.io server cluster node on rhel clone
#!/bin/bash
cd /tmp
wget https://github.com/nats-io/nats-server/releases/download/v2.10.5/nats-server-v2.10.5-amd64.rpm
yum install -y /tmp/nats-server-v2.10.5-amd64.rpm
rm -rf /tmp/nats-server-v2.10.5-amd64.rpm
useradd -U -M -r -s /sbin/nologin nats
mkdir -p /var/nats
mkdir -p /etc/nats/ssl
cat <<EOF > /etc/nats/nats-server.conf