Skip to content

Instantly share code, notes, and snippets.

View ValCapri's full-sized avatar

Schinckus Lionel ValCapri

View GitHub Profile
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active September 26, 2024 13:54
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@ponceto
ponceto / README.md
Last active February 6, 2023 17:27
A KISS firewall script based on iptables

KISS firewall

Abstract

These scripts are written to help you harden your Linux server.

Description

The firewall.sh script supports up to 3 interfaces :

@marcelrv
marcelrv / _docker-migrate-aufs.md
Last active September 2, 2024 13:23
Docker migrate to overlay2 from aufs script

Docker migrate to overlay2 from aufs script

Crazy that this is pretty much forced change without proper transition script

note. Based on https://www.sylvaincoudeville.fr/2019/12/docker-migrer-le-stockage-aufs-vers-overlay2/ NOT WORKING!!!! IF FOLLOWING THE ABOVE.. SOMEHOW THE CONTAINERS DO NOT RE-APPEAR!

The only way I found that is somewhat automated is the the docker-compose way..

Which is still not 100% and require manual fixing of stupid errors of the docker-compose tool (mainly things that ere not interpreted right, like dates & userIds that need to manually surrounded by quotes etc)

@zhuowei
zhuowei / Ensemble.plist
Last active September 18, 2023 06:26
Put this file as /Library/Preferences/FeatureFlags/Domain/Ensemble.plist and reboot to (hopefully) turn on Universal Control on macOS 12
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- not sure which one it is, so set both -->
<key>Ensemble</key>
<dict>
<key>Enabled</key>
<true/>
</dict>

As far as I can tell, you can't do it conveniently. That is, git-rebase does not give you an option to preserve the committer date. Unless you give the --ignore-date (or its alias, --reset-author-date) option, it will always preserve the author date. However, there is no way to make git-rebase preserve the committer date, unless some manual script is crafted.

The best you can do is to make the committer date equal to the author date. Recently (in 2020 Q4), git-rebase --interactive has gained the ability to use the --committer-date-is-author-date flag with the interactive rebase. Before that, there was no way of influencing the committer date at all with the interactive rebase. Note that this flag does not preserve the committer date. It merely makes the committer date equal to the author date.

You might be thinking "well, isn't that effectively preserving the committer date, since normally the committer date is always equal to the author date?". Normally, you would be correct. However, there

@koingdev
koingdev / ToolTipView.swift
Created June 26, 2020 07:34
Simple UIView class to display tooltip in iOS
/// Display ToolTip View
///
/// Example:
/// ```swift
/// let paragraph = NSMutableParagraphStyle()
/// paragraph.lineSpacing = 18
/// let attributes = [
/// NSAttributedString.Key.font : UIFont.systemFont(ofSize: 16),
/// NSAttributedString.Key.foregroundColor : UIColor.white,
/// NSAttributedString.Key.paragraphStyle : paragraph
@ChrisMarshallNY
ChrisMarshallNY / UIViewExtension.swift
Created June 1, 2020 15:50
UIView Extension to Add An Auto-Layout SubView With Equal All-Around Constraints (Fill)
extension UIView {
/* ################################################################## */
/**
This allows us to add a subview, and set it up with auto-layout constraints to fill the superview.
- parameter inSubview: The subview we want to add.
*/
func addContainedView(_ inSubView: UIView) {
addSubview(inSubView)
@taichikuji
taichikuji / README.md
Last active September 22, 2024 20:10
Get a DDNS up and running with DuckDNS - Step by Step

Get a DDNS up and running with DuckDNS - Step by Step

Understanding DDNS

In summary, DDNS stands for Dynamic DNS. DDNS updates a DNS name in real-time to point to a changing IP address. This is useful for devices without a static IP. For example, companies like Google use static IPs and IP ranges, which are more expensive than ephemeral IPs and IP ranges. DDNS provides a cost-effective alternative, linking a hostname to a dynamic IP address.

How Does DDNS Work?

To use DDNS, you need an account with a DDNS provider. While some services are paid, they are still cheaper than static public IPs from ISPs. A script or service on your device updates the DDNS server with your current IP at regular intervals to maintain the link between your hostname and IP address. Luckily for us, DuckDNS is free for everybody and relays on donations to keep their services running.

//
// AVPlayer+Singleton.swift
// DeveloperBelt
//
// Created by Egzon Pllana on 11/5/19.
// Copyright © 2019 Native Coders. All rights reserved.
//
import Foundation
import MediaPlayer

Proxmox VE Installation on Hetzner Server via Rescue System

Follow these steps to install Proxmox VE on a Hetzner server via the Rescue System. The Rescue System is a Linux-based environment that can be booted into to perform system recovery tasks. We'll be using it to install Proxmox VE.

In order to complete the process, it is indeed necessary to first boot into the Rescue System and then connect to it via SSH. This will allow you to run the commands for installing Proxmox VE. Here are the steps:

Starting the Rescue System

  1. Log into the Hetzner Robot.
  2. Under "Main Functions; Server" select the desired server and then open the tab "Rescue".