Skip to content

Instantly share code, notes, and snippets.

@elreydetoda
elreydetoda / Vagrantfile
Last active December 26, 2020 17:02
Algo vpn Vagrantfile. Simply vagrant up then ./algo, checkout the z-cmds section for easy consumption (z- is prepended so you see the vagrant files first).
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-18.04"
config.vm.provision "shell", inline: <<-SHELL
# installing and configure docker stuff
curl -fsSL 'https://get.docker.com' | bash
sudo usermod -aG docker vagrant
@LayZeeDK
LayZeeDK / angular-cli-node-js-typescript-rxjs-compatiblity-matrix.csv
Last active May 23, 2024 18:38
Angular CLI, Angular, Node.js, TypeScript, and RxJS version compatibility matrix. Officially part of the Angular documentation as of 2023-04-19 https://angular.io/guide/versions
Angular CLI version Angular version Node.js version TypeScript version RxJS version
~16.0.0 ~16.0.0 ^16.13.0 || ^18.10.0 >=4.9.5 <5.1.0 ^6.5.5 || ^7.4.0
~15.2.0 ~15.2.0 ^14.20.0 || ^16.13.0 || ^18.10.0 >=4.8.4 <5.0.0 ^6.5.5 || ^7.4.0
~15.1.0 ~15.1.0 ^14.20.0 || ^16.13.0 || ^18.10.0 >=4.8.4 <5.0.0 ^6.5.5 || ^7.4.0
~15.0.5 ~15.0.4 ^14.20.0 || ^16.13.0 || ^18.10.0 ~4.8.4 ^6.5.5 || ^7.4.0
~14.3.0 ~14.3.0 ^14.15.0 || ^16.10.0 >=4.6.4 <4.9.0 ^6.5.5 || ^7.4.0
~14.2.0 ~14.2.0 ^14.15.0 || ^16.10.0 >=4.6.4 <4.9.0 ^6.5.5 || ^7.4.0
~14.1.3 ~14.1.3 ^14.15.0 || ^16.10.0 >=4.6.4 <4.8.0 ^6.5.5 || ^7.4.0
~14.0.7 ~14.0.7 ^14.15.0 || ^16.10.0 >=4.6.4 <4.8.0 ^6.5.5 || ^7.4.0
~13.3.0 ~13.3.0 ^12.20.2 || ^14.15.0 || ^16.10.0 >=4.4.4 <4.7.0 ^6.5.5 || ^7.4.0
@hivokas
hivokas / fix-of-redis-error.md
Created July 7, 2018 07:48
Fix of Redis error (Can't save in background: fork: Cannot allocate memory)

Errors from Laravel logs:

MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

ERR Error running script (call to f_1af8e79ebe56ad4d7910f2e116e2555983099baf): @user_script:8: @user_script: 8: -MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

Errors from Redis logs (/var/log/redis/redis-server.log):

* 1 changes in 900 seconds. Saving...
@Kazanir
Kazanir / recurring.md
Last active June 17, 2020 08:27
Drupal Commerce Recurring 2.x Design Notes & Specification

Commerce Recurring 2.x

Intro

Recurring billing is an extremely complex feature with many use cases. In order to support all of these use cases in a robust way, a fully-featured Recurring module for Drupal Commerce 2.x needs to support them all, and be properly configurable/pluggable in a way that allows sufficient customization for developers while also being usable for store administrators.

This is a specification that attempts to transfer our accumulated knowledge from years of working on Commerce License Billing 1.x while also taking advantage of the designs Bojan and I worked on with Actualys and the Platform.sh team back in January.

The Overall Picture

@developit
developit / async-examples.js
Last active February 19, 2020 00:43
Async Array utilities in async/await. Now available as an npm package: https://github.com/developit/asyncro
/** Async version of Array.prototype.reduce()
* await reduce(['/foo', '/bar', '/baz'], async (acc, v) => {
* acc[v] = await (await fetch(v)).json();
* return acc;
* }, {});
*/
export async function reduce(arr, fn, val, pure) {
for (let i=0; i<arr.length; i++) {
let v = await fn(val, arr[i], i, arr);
if (pure!==false) val = v;
@silviucc
silviucc / how_to_build_kernel_on_Ubuntu.txt
Last active May 26, 2021 07:15
Easy way to build a mainline kernel on Ubuntu
Compiling a Linux kernel on Ubuntu
----------------------------------
This should be useful in the event that the user wants to investigate whether a newer kernel allows
certain peripherals to work better (or at all) or some other problems they might encounter while using
the kernel officially provided by Canonical.
As an example, I use the 4.1.5 release from kernel.org.
1) Make sure you have the build environment set up first:
@gblmarquez
gblmarquez / .tmux.conf
Created August 6, 2015 14:28
.tmux.conf with fish as default shell
# Default termtype. If the rcfile sets $TERM, that overrides this value.
set -g default-terminal screen-256color
# support logging out and back in
set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION"
# pbcopy support
set-option -g default-command "reattach-to-user-namespace -l bash"
# vi mode
@elvetemedve
elvetemedve / Arch Linux, Fedora
Last active December 31, 2021 11:30
Allow Vagrant usage without providing sudo password
sudo tee /etc/sudoers.d/vagrant > /dev/null << EOL
#
# Arch Linux, Fedora sudoers entries
#
# Allow passwordless startup of Vagrant with vagrant-hostsupdater.
Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts
Cmnd_Alias VAGRANT_HOSTS_REMOVE = /usr/bin/sed -i -e /*/ d /etc/hosts
%sudo ALL=(root) NOPASSWD: VAGRANT_HOSTS_ADD, VAGRANT_HOSTS_REMOVE
#!/usr/bin/env python
# Quick and dirty demonstration of CVE-2014-0160 by
# Jared Stafford (jspenguin@jspenguin.org)
# Modified so that it finds cookies
import sys
import struct
import socket
import time
import select