Skip to content

Instantly share code, notes, and snippets.

View Treborium's full-sized avatar

Robert Treborium

  • Hrmony GmbH
View GitHub Profile
@Treborium
Treborium / show-modified-files.sh
Created August 4, 2023 07:59
Show modified files in git repository
git diff --name-only --diff-filter=ACMRT | grep -E '.*\.schema\.json$'
@Treborium
Treborium / rust.rs
Created February 20, 2020 10:15
Use ? Operator in Rust documentation
/// # Examples
///
/// ```
/// let output = get_utf8_vec();
/// println!("{}", String::from_utf8(output)?);
/// # Ok::<(), std::string::FromUtf8Error>(())
/// ```
@Treborium
Treborium / update.py
Created December 23, 2019 09:24
Update all packages of a given package manager sequentially
#!/usr/bin/env python3
import subprocess
import platform
import sys
class Update:
def __init__(self, list_packages_cmd: str, update_package_cmd: str):
self.list_packages_cmd = list_packages_cmd
// Add the line below to your HTML
// <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">
// Infinite scroll
$(window).on("scroll", function() {
var scrollHeight = $(document).height();
var scrollPos = $(window).height() + $(window).scrollTop();
if ((scrollHeight - scrollPos) / scrollHeight == 0) {
$('.load-more-days-button').click();
console.log("bottom!");