Skip to content

Instantly share code, notes, and snippets.

View git-commit's full-sized avatar

Maximilian Berger git-commit

View GitHub Profile
@tfeldmann
tfeldmann / duplicates.py
Last active April 8, 2025 16:21
Fast duplicate file finder written in python
#!/usr/bin/env python
"""
Fast duplicate file finder.
Usage: duplicates.py <folder> [<folder>...]
Based on https://stackoverflow.com/a/36113168/300783
Modified for Python3 with some small code improvements.
"""
import os
import sys
@dlangille
dlangille / SATA connectors inside the case
Last active July 15, 2020 14:18
Dell R720 internal SATA drives
Says connectors 2 & 4
SATA connectors:
photo, see above left RAM: https://cdn.etb-tech.com/media/catalog/product/cache/68250b5260b930b2300bcc8422ca32a1/r/7/r720_r720xd_mb_h5j4j_v5_top_zoom.jpg
https://www.ixsystems.com/community/threads/how-to-install-internal-ssd-boot-drive-for-dell-r720.77745/
See p 129 on this manual https://topics-cdn.dell.com/pdf/poweredge-r720_owners-manual_en-us.pdf
@Nachtalb
Nachtalb / telegram-desktop-multiple-accounts.rst
Last active April 8, 2025 16:37
Add multiple accounts in Telegram Desktop [Linux | MacOSX | Windows]
@fnordomat
fnordomat / WIFIonICE.sh
Last active February 22, 2024 11:18
Automatic negotiation of a captive portal: connect to icomera wifi in DB ICE trains (Germany) without having to jump through hoops.
#!/bin/bash
# Deutsche Bahn / icomera AB offers "free wifi" (ESSID: "WIFIonICE") with internet access via
# mobile networks on some high-speed (ICE) trains.
#
# This takes care of the WIFIonICE captive portal.
#
# Please drop me a note if this script is insecure for some reason. It probably is.
#
@chenxiaolong
chenxiaolong / DellXPS15_9560_AHCI_RAID.md
Created November 27, 2017 01:33
Switching between AHCI and RAID on the Dell XPS 15 (9560)

Switching between AHCI and RAID on the Dell XPS 15 (9560)

This guide likely applies to other models and, potentially, even laptops from other OEMs that have NVME drives. However, I've only tested this on my Dell XPS 15 (9560) with the OEM Windows installation from the Signature Edition model.

Switching from RAID to AHCI

Switching from RAID to AHCI is significantly simpler than switching from AHCI to RAID. All that's needed is a successful boot to Safe Mode.

  1. To set the default boot mode to Safe Mode, use msconfig.exe or open an admin cmd/PowerShell window and run:
@PEZ
PEZ / UIControl+ListenBlock.swift
Created September 20, 2017 23:04
Swift3 UIControl extension for adding block event listeners. Adapted from: https://stackoverflow.com/a/44917661/44639
import Foundation
import UIKit
extension UIControl {
func listen(_ action: @escaping () -> (), for controlEvents: UIControlEvents) -> AnyObject {
let sleeve = ClosureSleeve(attachTo: self, closure: action, controlEvents: controlEvents)
addTarget(sleeve, action: #selector(ClosureSleeve.invoke), for: controlEvents)
return sleeve
}
@k4ml
k4ml / slacktg_bridge.py
Last active March 22, 2020 22:36
2 way bridge between Slack and Telegram.
"""
Copyright 2017 [email protected].
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
@abe312
abe312 / stdc++.h for mac users with clang
Created April 18, 2017 18:49
paste this in /usr/local/include/bits/
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
// any later version.
@4383
4383 / google-bookmarks-to-markdown-format.py
Created December 2, 2016 15:33
Export manualy your google bookmarks and transform it to markdown format for hosting and versioning on github (quick and dirty)
# First export manualy your google bookmarks in place exported file in the same directory of this script
# After launch this script (python google-bookmarks-to-markdown-format.py) and have fun !
def run():
output = []
with open('GoogleBookmarks.html') as export:
html = export.readlines()
for line in html:
if 'H3' in line:
output.append('## {0}'.format(line[36:-6].capitalize()))
if 'A HREF' in line:
//
// Signal+Extensions.swift
// Khan Academy
//
// Created by Nacho Soto on 10/1/15.
// Copyright © 2015 Khan Academy. All rights reserved.
//
import ReactiveCocoa