Skip to content

Instantly share code, notes, and snippets.

View exiguus's full-sized avatar
🍍

Simon Gattner exiguus

🍍
View GitHub Profile
@exiguus
exiguus / array2String.js
Last active July 11, 2018 12:04
Solutions in JavaScript to return a Array as a String and manipulate it with performance tests and examples
/* eslint-disable
require-jsdoc,
no-var,
camelcase,
no-console,
no-unused-vars
*/
/**
* @fileOverview string2Array
@exiguus
exiguus / README.md
Last active November 9, 2018 14:15
Karma, Puppeteer, ChromeHeadless, Jenkins Executor Deps

Karma & ChromeHeadless

Karma / Jasmine / Webpack with Puppeteer (ChromeHeadless) and Jenkins Executor Deps

OS Dependencies

packages (debian / ubuntu)

gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
@exiguus
exiguus / db.blockeddomains
Created January 17, 2019 23:45
Block Facebook Graph tracking in apps
;
; BIND data file for example.local
;
$TTL 3600
@ IN SOA ns.example.local. root.ns.example.local. (
2014052101 ; Serial
7200 ; Refresh
120 ; Retry
2419200 ; Expire
3600) ; Default TTL
@exiguus
exiguus / .htaccess
Created April 23, 2019 16:52
Light House Recommendations for Apache2
# .htaccess
# Apache/2.4.10 (Debian)
#
# AllowOverride FileInfo Indexes Options
##############################################
# Caching
##############################################
<IfModule headers_module>
@exiguus
exiguus / nginx.conf
Created October 25, 2019 19:29
nginx webdav config
server {
listen 127.0.0.1:8181;
server_name localhost;
root /var/www/webdav;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htaccess;
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
@exiguus
exiguus / proxy.js
Created March 12, 2020 06:52
express / proxy, middleware - manipulate and map target requests and responses
/**
* express / proxy, middleware
* manipulate and map target requests and responses
*
* - inject assets to test / develop features, fixes ...
* - overwrite JavaScript and CSS served by the target
*/
/**
* Module dependencies.
@exiguus
exiguus / Readme.md
Created June 9, 2020 13:52
WP Docker Quick Setup

WP Docker Quick Setup

Docker Images WP / MySQL Dev Env

Run

Run docker-compose -f stack.yml up

Develop

@exiguus
exiguus / Multiplex.md
Created June 11, 2020 12:39
SSH Multiplexing

SSH Multiplexing

In OpenSSH, multiplexing can re-use an existing outgoing TCP connection for multiple concurrent SSH sessions to a remote SSH server, avoiding the overhead of creating a new TCP connection and reauthenticating each time. (https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing)

  • sshuttle
  • ssh

sshuttle

@exiguus
exiguus / 00-setup.md
Last active July 16, 2020 19:15
Proxmox Setup Host (bridge) intern/public (nat pfsense/non-host route)

Proxmox bridged Setup

Bridge Setup with additional (virtual) Guest IPs

  1. Proxmox host Debian
  • HOST proxmox
  • IP 1.0.0.23/24
  • Gateway IP 1.0.0.1
  1. Proxmox Guest pfSense (public)
  • HOST pfsense-public
@exiguus
exiguus / useNetwork.ts
Created October 25, 2020 09:59
NetworkInfo Hook
import { useState, useEffect } from 'react'
// Network Information API
// NetworkInfo https://wicg.github.io/netinfo/
// https://caniuse.com/netinfo
enum ConnectionType {
'bluetooth',
'cellular',
'ethernet',