Skip to content

Instantly share code, notes, and snippets.

View tobikris's full-sized avatar
🍪

Tobias Krischer tobikris

🍪
View GitHub Profile
@tobikris
tobikris / with-sso-gitlab.yaml
Created August 1, 2022 16:10
NetBox with SSO
---
apiVersion: v1
kind: Namespace
metadata:
name: netbox
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: netbox
@tobikris
tobikris / repair-dualboot-bootloader.sh
Last active April 14, 2024 22:47 — forked from Tamal/set-chroot.sh
Setting up chroot from a live image in Fedora. Regenerate grub2 for Fedora.
$ # Use Live CD to boot
$ sudo su # Switch to root
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid
$ # http://dadadom.de/2020/04/11/fix-fedora-uefi-boot-with-encrypted-partitions/
$ udiskctl unlock -b /dev/nvme0n1p6 # unlock root luks partition
$ mount /dev/mapper/fedora_fedora-root /mnt # mount root partition
$ mount /dev/mapper/fedora_fedora-var /mnt/var
$ mount /dev/nvme0n1p5 /mnt/boot # mount boot partition
@tobikris
tobikris / bumpme
Last active February 17, 2021 19:30
Wed Feb 17 19:35:51 UTC 2021
@tobikris
tobikris / gist:2d709777024b7bc40370
Created June 25, 2015 17:25
Artisan Command Progressbar
<?php
$progressBar = $this->output->createProgressBar(count($users));
$progressBar->setEmptyBarCharacter(' ');
$progressBar->setProgressCharacter('>');
$progressBar->setBarCharacter('-');
$progressBar->start();
foreach ($users as $user) {
$this->performTask($user);
@tobikris
tobikris / friends_of.sql
Created June 11, 2015 13:02
SQL SELECT for bi-directional friends
SELECT
IF(`user_id`="1",`user_id`,`friend_id`) AS `user_id`,
IF(`user_id`="1",`friend_id`,`user_id`) AS `friend_id`,
`user_id` AS `source_id`
FROM
friends
WHERE
`user_id`="1"
OR
`friend_id`="1"
@tobikris
tobikris / Charset
Created June 8, 2014 21:21
.htaccess Examples
AddDefaultCharset utf-8