Skip to content

Instantly share code, notes, and snippets.

View mstaack's full-sized avatar
🎯
Focusing

Max mstaack

🎯
Focusing
View GitHub Profile
@mstaack
mstaack / print-headers-401.go
Created May 13, 2024 07:47 — forked from GauthamBanasandra/print-headers-401.go
A simple HTTP server in Golang which just prints all the headers
package main
import (
"net/http"
"fmt"
"time"
)
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Printf("Request at %v\n", time.Now())
@mstaack
mstaack / wireguard
Created October 2, 2023 12:59 — forked from kbabioch/wireguard
LSBInitScript for Wireguard: This is a leightweight init script for Wireguard. While Wireguard itself requires only minimal overhead to setup and start, it still requires some script invocations (e.g. during boot).
#! /bin/bash
# Copyright (c) 2021 Karol Babioch <[email protected]>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@mstaack
mstaack / build_libvips.md
Created November 2, 2022 15:15 — forked from renexu/build_libvips.md
build latest libvips deb on ubuntu 18.04

These are the steps to build latest libvips (8.7.4) deb package on ubuntu 18.04

##1. install build scripts

# sudo apt install build-essential devscripts

##2. download vips source

@mstaack
mstaack / NovaServiceProvider.php
Created February 17, 2021 14:48 — forked from jbrooksuk/NovaServiceProvider.php
Using Nova::sortResourcesBy
<?php
namespace App\Providers;
use Laravel\Nova\Nova;
use Laravel\Nova\Cards\Help;
use Illuminate\Support\Facades\Gate;
use Laravel\Nova\NovaApplicationServiceProvider;
class NovaServiceProvider extends NovaApplicationServiceProvider
@mstaack
mstaack / install.sh
Created October 12, 2020 11:21 — forked from yuvadm/install.sh
Arch Linux installation on Lenovo ThinkPad X200s
# Arch Linux installation procedure on a Lenovo ThinkPad X200s
# BIOS boot (no UEFI), SSD + LVM + LUKS + TRIM + discards
# Randomize (or zero) drive contents
dd if=/dev/urandom of=/dev/sda
# Create GPT and partitions
# Use gdisk to ensure proper partition alignment
gdisk /dev/sda
# 100MB boot partition on /dev/sda1 type 8300
@mstaack
mstaack / .screenrc
Created July 22, 2019 07:43 — forked from Coomer/.screenrc
Coomer's .screenrc for GNU Screen on Mac OS X. Save this as .screenrc in your home directory.
altscreen on
hardstatus on
hardstatus alwayslastline
startup_message off
termcapinfo xterm ti@:te@
hardstatus string " %{= kC}%-w%{.rW}%n %t%{-}%+w %=%{..C} %H %{..C} %m/%d "
defscrollback 1000
# Bind C-a v to copy buffer to Mac OS X clipboard.
bind v eval "writebuf" "exec sh -c 'pbcopy < /tmp/screen-exchange'"
@mstaack
mstaack / UFW_ban_country.md
Created April 28, 2019 23:29 — forked from jasonruyle/UFW_ban_country.md
UFW to block countries
@mstaack
mstaack / proxvm.sh
Created December 14, 2018 12:53 — forked from huksley/proxvm.sh
Get list of all virtual machines on proxmox 4+, both LXC and QEMU and detect IP addresses
#!/bin/bash
# proxvm
# Output in specifed format (default csv) all virtual machines on proxmox 4+
SERVER=localhost
USERNAME=apiread@pve
PASSWORD=123456
FORMAT=csv
while [[ $# > 0 ]]; do
key="$1"
@mstaack
mstaack / .gitignore
Created November 27, 2018 22:50 — forked from jbergler/.gitignore
Acestream on Mac
.vagrant
@mstaack
mstaack / BinaryFileResponse.php
Created November 17, 2018 22:30 — forked from stealth35/BinaryFileResponse.php
BinaryFileResponse with X-SendFile and Date Range
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/