Skip to content

Instantly share code, notes, and snippets.

@JohannesMP
JohannesMP / LICENSE
Last active March 9, 2024 11:26
[Unity3D] A Reliable, user-friendly way to reference SceneAssets by script.
/*******************************************************************************
* Don't Be a Jerk: The Open Source Software License.
* Adapted from: https://github.com/evantahler/Dont-be-a-Jerk
*******************************************************************************
* _I_ am the software author - JohannesMP on Github.
* _You_ are the user of this software. You might be a _we_, and that's OK!
*
* This is free, open source software. I will never charge you to use,
* license, or obtain this software. Doing so would make me a jerk.
*
@djabif
djabif / slugify.pipe.ts
Last active April 12, 2023 21:34
Angular Pipe to transform a string into a slug
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({name: 'slugify'})
export class SlugifyPipe implements PipeTransform {
transform(input: string): string {
return input.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
@abrahamrhoffman
abrahamrhoffman / centos7ksiso.md
Last active March 11, 2022 22:39
CentOS 7 Kickstart File & How to build an (auto install) ISO

CentOS 7 Kickstart File - HOWTO Build ISO

There is so much documentation online from RedHat and CentOS about this topic - it's sad that I am writing this. But the real state of documentation on this topic (CentOS 7 + KS + ISO = Bootable DVD) is almost non-existent.

I found this: http://smorgasbork.com/component/content/article/35-linux/151-building-a-custom-centos-7-kickstart-disc-part-1

Which I greatly appreciate and +1, but the documentation is half-baked and there are numerous errors.

Finally... FINALLY! After four days of banging my head, I got this to work. Hopefully someone else will be able to do this in a few hours, instead of blowing their weekend like me. :(