Skip to content

Instantly share code, notes, and snippets.

View krzysztofantczak's full-sized avatar

Krzysztof Antczak krzysztofantczak

View GitHub Profile
@krzysztofantczak
krzysztofantczak / 002.Kafka.PKCS12.SSL
Last active February 2, 2024 07:22
Kafka PKCS12 SSL
#
import numpy as np
import scipy, scipy.signal
def fftconvolve(in1, in2, mode="full"):
"""Convolve two N-dimensional arrays using FFT.
Convolve `in1` and `in2` using the fast Fourier transform method, with
the output size determined by the `mode` argument.
This is generally much faster than `convolve` for large arrays (n > ~500),
but can be slower when only a few output values are needed, and can only
output float arrays (int or object array inputs will be cast to float).
# basic pfctl control
# ==
# Related: http://www.OpenBSD.org
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.
@krzysztofantczak
krzysztofantczak / prosody-setup.lua
Created October 27, 2015 12:02 — forked from legastero/prosody-setup.lua
Set up a Prosody server to work with stanza.io/otalk (with websockets, mam, etc)
-- 1. apt-get install prosody-trunk
-- 2. Checkout prosody-modules on Google Code
-- 3. Move all modules to /usr/lib/prosody/modules
-- 4. Move the mod_smacks module to mod_smacks2 and copy it to mod_smacks3
-- 5. Move the files in mod_smacks* to match the new names
-- 6. In mod_smacks3/mod_smacks3.lua s/urn:xmpp:sm:2/urn:xmpp:sm:3/g
-- 7. Set the Prosody configuration to:
admins = { "ADMIN@HOST" }
daemonize = true

Keybase proof

I hereby claim:

  • I am krzysztofantczak on github.
  • I am lockbox (https://keybase.io/lockbox) on keybase.
  • I have a public key whose fingerprint is 3099 E525 812A 7971 D4D5 8AF8 0AE7 3457 99DC 579F

To claim this, I am signing this object:

@krzysztofantczak
krzysztofantczak / gist:282f76a10aa0da18125c
Last active August 29, 2015 14:27 — forked from wofeiwo/gist:3634357
Golang daemonize
/* ivan(a.t)mysqlab.net */
package main
import (
"syscall"
"os"
"log"
)
func daemon(nochdir, noclose int) int {
@krzysztofantczak
krzysztofantczak / .gitignore
Last active August 29, 2015 14:27 — forked from brianm/.gitignore
Go net/rpc over ssh+netcat and unix domain sockets It would be nice if ssh.Session implemented io.ReaderWriter
local_client
server
client
ext
/* bling.js */
window.$ = document.querySelectorAll.bind(document)
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn)
}
NodeList.prototype.__proto__ = Array.prototype
@krzysztofantczak
krzysztofantczak / launcher
Last active August 29, 2015 14:11 — forked from jas-/launcher
#!/bin/bash
# VM launcher
# Jason Gerfen <jason.gerfen@gmail.com>
# Create new if asked
if [ "$1" == "install" ]; then
if [ -f "$3" ]; then
dd if=/dev/zero of=vm/$2 bs=516096 seek=9182 count=0
qemu-system-x86_64 -m 2048 -boot d -cdrom $3 vm/$2 -net nic -net user
@krzysztofantczak
krzysztofantczak / readme.md
Last active August 29, 2015 14:11 — forked from jas-/readme.md

802.1Q networking, LAMP stack, TFPT & MySQL user permissions

Details on the current configuration of tyr.example.com can be found below. 10/11/2012

Kernel

Raid

Details for the raid1 configuration are as follows:

fdisk