Skip to content

Instantly share code, notes, and snippets.

View kalicki2k's full-sized avatar
🎯
Focusing

Sebastian Kalicki kalicki2k

🎯
Focusing
View GitHub Profile
@kalicki2k
kalicki2k / async-foreach.js
Created March 24, 2018 18:33 — forked from Atinux/async-foreach.js
JavaScript: async/await with forEach()
const waitFor = (ms) => new Promise(r => setTimeout(r, ms))
const asyncForEach = (array, callback) => {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array)
}
}
const start = async () => {
await asyncForEach([1, 2, 3], async (num) => {
await waitFor(50)
@kalicki2k
kalicki2k / change_author_git_commit.md
Last active October 14, 2017 12:37 — forked from albertodebortoli/change_author_git_commit.md
Change the author of a commit in Git

Using Interactive Rebase

git rebase -i -p <some HEAD before all of your bad commits>

Then mark all of your bad commits as "edit" in the rebase file, and when git asks you to amend each commit, do

git commit --amend --author "New Author Name <email@address.com>"

edit or just close the editor that opens, and then do

@kalicki2k
kalicki2k / git-commit-author-rewrite.md
Created September 1, 2017 13:04 — forked from trey/git-commit-author-rewrite.md
Change the email address for a git commit.

Change the email address for a git commit.

$ git commit --amend --author="Author Name <email@address.com>"

or

$ git commit --amend --reset-author
@kalicki2k
kalicki2k / README.md
Created May 16, 2017 20:53 — forked from Spea/README.md
Script to auto reply emails.

General

This script can be used in conjunction with the ISPmail tutorial and the Roundcube autoreply plugin

Installation

Database setup

Create the following table in the database where you created the tables from the ISPmail tutorial.

@kalicki2k
kalicki2k / netatalk-install.sh
Last active May 1, 2017 18:44
Installations script for netatalk on Debian 8.7.1
#!/usr/bin/env bash
# Update package lists and information from the repositories.
apt-get update
# Install necessary packages. Afterwards we can download and compile netatalk.
apt-get install -y wget build-essential libevent-dev libssl-dev libgcrypt11-dev libkrb5-dev libpam0g-dev libwrap0-dev libdb-dev libtdb-dev libmysqlclient-dev avahi-daemon libavahi-client-dev libacl1-dev libldap2-dev libcrack2-dev systemtap-sdt-dev libdbus-1-dev libdbus-glib-1-dev libglib2.0-dev libio-socket-inet6-perl tracker libtracker-sparql-1.0-dev libtracker-miner-1.0-dev
# Download and extract netatalk.
wget "https://netix.dl.sourceforge.net/project/netatalk/netatalk/3.1.11/netatalk-3.1.11.tar.gz" -O /tmp/netatalk-3.1.11.tar.gz