Skip to content

Instantly share code, notes, and snippets.

View slonka's full-sized avatar

Krzysztof Słonka slonka

View GitHub Profile
<!DOCTYPE html>
<!-- saved from url=(0073)file:///private/var/folders/ts/xg_0vxrd0yj9n7pckrc0fq5r0000gn/T/diff.html -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Pretty Diff</title>
<style>
body {
text-align: center;
}
#wrapper {
<!DOCTYPE html>
<!-- saved from url=(0073)file:///private/var/folders/ts/xg_0vxrd0yj9n7pckrc0fq5r0000gn/T/diff.html -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Pretty Diff</title>
<style>
body {
text-align: center;
}
#wrapper {
<!DOCTYPE html>
<!-- saved from url=(0073)file:///private/var/folders/ts/xg_0vxrd0yj9n7pckrc0fq5r0000gn/T/diff.html -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Pretty Diff</title>
<style>
body {
text-align: center;
}
#wrapper {
@slonka
slonka / Corefile
Created December 16, 2022 09:37
coredns config with logging
.:{{ .CoreDNSPort }} {
forward . 127.0.0.1:{{ .EnvoyDNSPort }}
alternate NOTIMP,FORMERR,NXDOMAIN,SERVFAIL,REFUSED . /etc/resolv.conf
prometheus localhost:{{ .PrometheusPort }}
errors
log
}
.:{{ .CoreDNSEmptyPort }} {
template ANY ANY . {
.:15053 {
forward . 127.0.0.1:15055
alternate NOTIMP,FORMERR,NXDOMAIN,SERVFAIL,REFUSED . 10.88.16.10:53
prometheus localhost:19153
errors
}
.:15054 {
template ANY ANY . {
rcode NXDOMAIN
@slonka
slonka / android_burp.txt
Created December 29, 2021 08:15 — forked from tothi/android_burp.txt
android emulator setup with sniffer CA
android emulator clean install + prepare for https proxy analysis
=================================================================
# clean up old packages
rm -fr ~/Android ~/.android
# install recent Android Studio (on gentoo)
sudo emerge -a dev-util/android-studio
# set up local sdk packages in ~/Android by 1st run of Android Studio GUI
// nth smallest number from an array
// [6, 3, 2, 7, 12, 4]
// 1-st smallest number = 2
// 2-nd smallest number = 3
// 3-rd smallest number = 4
function nthsmallest(arr, n) {
let min = arr[0];
let min2 = arr[0];
// a + b > c , a + c > b, b + c > a
function triangleInequality(a, b, c) {
if (typeof a !== 'number' || typeof b !== 'number' || typeof c !== 'number') {
return NaN
}
return (a + b) > c && (a + c) > b && (b + c) > a;
}
const http = require('http');
const _ = require('koa-route');
const Koa = require('koa');
const bodyParser = require('koa-bodyparser');
const request = require('request-promise-native');
const environment = process.env.ENVIRONMENT;
const peersPath = environment === 'test' ? 'peers-test' : 'peers-prod';

Keybase proof

I hereby claim:

To claim this, I am signing this object: