Skip to content

Instantly share code, notes, and snippets.

View gabyx's full-sized avatar
👌
More Single Layer of Abstraction please ...

Gabriel Nützi gabyx

👌
More Single Layer of Abstraction please ...
  • former Zetta25 AG
  • Zürich
View GitHub Profile
/**
* rofi -dump-theme output.
* Rofi version: 1.7.5
**/
* {
alternate-urgent-background: var(lightbg);
alternate-active-foreground: var(blue);
selected-active-background: var(blue);
selected-urgent-foreground: var(background);
fg2: rgba ( 150, 150, 150, 100 % );
configuration {
/* modes: "window,drun,run,ssh";*/
/* font: "mono 12";*/
/* location: 0;*/
/* yoffset: 0;*/
/* xoffset: 0;*/
/* fixed-num-lines: true;*/
/* show-icons: false;*/
/* terminal: "rofi-sensible-terminal";*/
/* ssh-client: "ssh";*/
#!/usr/bin/env python3
# based on https://github.com/newren/git-filter-repo/blob/main/contrib/filter-repo-demos/insert-beginning
"""
This is a simple program that will insert some regular file into the root
commit(s) of history, e.g. adding a file named LICENSE or COPYING to the
first commit. It also rewrites commit hashes in commit messages to update
them based on these changes.
"""
import argparse
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import argparse
import tempfile
import operator
from functools import partial, reduce
import subprocess
from tqdm import tqdm
#!/bin/bash
# shellcheck disable=SC2015
repoDir="$1"
example="$2"
function die() {
echo -e "$@" >&2
exit 1
}
@gabyx
gabyx / testGitExamples.sh
Last active June 4, 2020 13:55
testGitExamples.sh
#!/bin/bash
# shellcheck disable=SC2015
repoDir="$1"
example="$2"
function die() {
echo -e "$@" >&2
exit 1
}
@gabyx
gabyx / installVirtualMachine.sh
Last active July 13, 2023 00:58
Unattended installation of any virtual machine with Virtual Box 6
#!/bin/bash
#
# Unattendet installation of any virtual machine with
# Virtual Box 6.
# The script walks you through the needed options with
# default values.
#
# Usage:
# `installVirtualMachine.sh --force-delete \
# --post-script-url "https://server.com/script.sh"`
@gabyx
gabyx / StringConversion.cpp
Created February 8, 2018 22:19
Fast String Conversion
#include <iostream>
#include <type_traits>
#include <iomanip>
#define white_space(c) ((c) == ' ' || (c) == '\t')
#define valid_digit(c) ((c) >= '0' && (c) <= '9')
namespace StringConversion
{
namespace detail
From b3191a0b675823edc8ea6eef29b7e36dba1f646f Mon Sep 17 00:00:00 2001
From: Gabriel Nuetzi <gnuetzi@gmail.com>
Date: Thu, 11 Jan 2018 23:51:47 +0100
Subject: [PATCH 1/2] Revert "llvm: remove lldb patch"
This reverts commit 8f84c9238a9a5f8d85a08755c20eff9c8040a6b1.
---
Formula/llvm.rb | 6 ++++++
1 file changed, 6 insertions(+)
@gabyx
gabyx / fileRegexReplace.sh
Last active June 13, 2018 14:51
Powerfull and Safe Find/Replace Bashscript (using perl)
#!/bin/bash
# =============================================================================
#
# Find and Replace Files inplace.
#
# @author Gabriel Nützi
# @date 02.05.2018
#
# fileRegexReplace -h for Help!
# =============================================================================