for unattended installations
Ansible module: http://docs.ansible.com/ansible/debconf_module.html
query the debconf database
$ debconf-show postfix
// | |
// ComplicationController+helpers.swift | |
// WatchKit Extension | |
// | |
// Created by Lukas Petr on 09.02.2022. | |
// Distributed under MIT License. | |
// | |
// | |
// Helper methods for creating pixel-perfect complications for all Apple Watch sizes. |
# Example YAML to get you started quickly. | |
# Be aware that YAML has indentation based scoping. | |
# Code completion support is available so start typing for available options. | |
swagger: '2.0' | |
# This is your document metadata | |
info: | |
version: "1.0.0" | |
title: Hebcal API | |
description: Description something something |
/* | |
* One of the questions that recently came up is how to remove vowels from Hebrew characters in Unicode | |
* (or any other similar language). A quick look at Hebrew Unicode chart shows that the vowels are all | |
* located between 0x0591 (1425) and 0x05C7 (1479). With this and Javascript's charCodeAt function, it | |
* is trivial to strip them out with Javascript as follows | |
* | |
* Live demo is available here: | |
* https://jsfiddle.net/js0ge7gn/ | |
*/ |
for unattended installations
Ansible module: http://docs.ansible.com/ansible/debconf_module.html
query the debconf database
$ debconf-show postfix
import org.apache.spark.rdd.RDD | |
def winsorize(data: RDD[Double], limits:(Double,Double)): RDD[Double] = { | |
val r = data.sortBy(x => x) | |
val c = r.count() | |
if (c <= 2) r | |
else { | |
val n0 = limits._1 * (c + 1d) | |
val n1 = limits._2 * (c + 1d) | |
val k0 = n0.toLong |
sub vcl_deliver { | |
if (req.url ~ "/fonts/") { | |
set resp.http.Access-Control-Allow-Origin = "*"; | |
set resp.http.Access-Control-Allow-Methods = "GET, OPTIONS"; | |
set resp.http.Access-Control-Allow-Headers = "Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token"; | |
} | |
} |
stud repo: https://github.com/bumptech/stud
###Compiling from source: stud on Ubuntu repository is outdated. Here's how to compile that from source:
sudo apt-get install -y libev-dev libssl-dev git-core
git clone git://github.com/bumptech/stud.git
#!/bin/bash | |
# This script is used by Nagios to post alerts into a Slack channel | |
# using the Incoming WebHooks integration. Create the channel, botname | |
# and integration first and then add this notification script in your | |
# Nagios configuration. | |
# | |
# All variables that start with NAGIOS_ are provided by Nagios as | |
# environment variables when an notification is generated. | |
# A list of the env variables is available here: |
varnishncsa -F '{ | |
"@source" => "unknown", | |
"@type" => "varnish", | |
"@fields" => { | |
"remote_addr"=>"%h", | |
"remote_user" => "%u", | |
"x_forwarded_for" => "%{X-Forwarded-For}i", | |
"hit_miss"=>" %{Varnish:hitmiss}x", | |
"body_bytes_sent"=>"%b", | |
"request_time"=>"%{Varnish:time_firstbyte}x", |