Skip to content

Instantly share code, notes, and snippets.

View xenji's full-sized avatar

Mario Mueller xenji

  • Mettmann, Germany
  • 07:16 (UTC +02:00)
View GitHub Profile
@JochemKuijpers
JochemKuijpers / install_synology_drive_on_fedora.sh
Created January 5, 2019 03:40
Installs Synology Drive on Fedora 29 (from the .deb package). Use at own risk.
#!/usr/bin/env bash
if [[ $UID != 0 ]];
then
echo "Please run this script with sudo or as root:"
echo
echo "sudo $0 $*"
exit 1 || return 1
fi
@Fleshgrinder
Fleshgrinder / windows-setup.ps1
Last active August 23, 2020 06:56
A few commands I routinely execute after setting up a new Windows machine to speed thing up a little and disable annoying stuff.
function dword {
Param([string] $path, [string] $name, [string] $value)
if (!(Test-Path $path)) {
New-Item -Path (Split-Path $path) -Name (Split-Path $path -leaf) | Out-Null
}
New-ItemProperty -Path $path -Name $name -Value $value -PropertyType DWORD -Force | Out-Null
}
# disables the creation of so called 8dot3names
fsutil 8dot3name set 1 | Out-Null
@nomaster
nomaster / config.boot
Last active October 5, 2023 07:35
EdgeRouter: DNS forwarding to CloudFlare with DNSSEC
set service dns forwarding name-server 1.1.1.1
set service dns forwarding name-server 1.0.0.1
set service dns forwarding name-server '2606:4700:4700::1111'
set service dns forwarding name-server '2606:4700:4700::1001'
set service dns forwarding options dnssec
set service dns forwarding options trust-anchor=.,19036,8,2,49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5
set service dns forwarding options trust-anchor=.,20326,8,2,E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D
set service dns forwarding options dnssec-check-unsigned
set service dns forwarding options dnssec-timestamp=/config/dnsmasq/dnsmasq.time
@thibautsacreste
thibautsacreste / aws.sg.unused
Last active June 4, 2024 10:12
Bash: list unused AWS security groups
#!/usr/bin/env bash
# lists all unused AWS security groups.
# a group is considered unused if it's not attached to any network interface.
# requires aws-cli and jq.
# all groups
aws ec2 describe-security-groups \
| jq --raw-output '.SecurityGroups[] | [.GroupName, .GroupId] | @tsv' \
| sort > /tmp/sg.all
@kwilczynski
kwilczynski / disable-ipv6.sh
Last active April 11, 2024 11:09
Amazon Linux OS tweaks
#!/bin/bash
set -u
set -e
set -o pipefail
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
cat <<'EOF' > /etc/modprobe.d/blacklist-ipv6.conf
@NickCraver
NickCraver / Windows10-Setup.ps1
Last active April 1, 2024 10:52
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@xrstf
xrstf / setup.md
Last active October 3, 2022 13:30
Nutch 2.3 + ElasticSearch 1.4 + HBase 0.94 Setup

Info

This guide sets up a non-clustered Nutch crawler, which stores its data via HBase. We will not learn how to setup Hadoop et al., but just the bare minimum to crawl and index websites on a single machine.

Terms

  • Nutch - the crawler (fetches and parses websites)
  • HBase - filesystem storage for Nutch (Hadoop component, basically)
@plentz
plentz / nginx.conf
Last active July 2, 2024 13:20
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@neilellis
neilellis / install-icinga.sh
Last active April 12, 2019 13:24
Automated install for icinga on Centos 6.4 with ichinga-web, nagios-api and nagdash - please check the script before running hey :-)
#!/bin/sh
# Copyright 2013 Neil Ellis
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@CHH
CHH / 00_rfc_decorators.md
Last active March 20, 2023 13:48
PHP Decorators RFC

PHP Decorators (alternative proposal to Annotations)

Inspiration: Python Decorators

Todo

  • Further refine how class decorators should work. Should they work on the instance level? Or should they just receive the class name, and can only be used for providing metadata? Instance level is probably the only one that makes sense in PHP. Problem is though, that then the decorator is not called when used in the declaration.