Skip to content

Instantly share code, notes, and snippets.

@Vertecedoc4545
Vertecedoc4545 / Hyprland-Ubuntu.md
Last active May 5, 2024 19:33
Ubuntu 23.04 Build and Install instructions for Hyprland

Building on Ubuntu 23.04

You have 2 options, use the script descrived bellow or follow the instrutions

script in this gist if you want the source code

wget https://gist.githubusercontent.com/Vertecedoc4545/6e54487f07a1888b656b656c0cdd9764/raw/2c5e8ccb428fc331307e2f653cab88174c051310/build-ubuntu-23.sh
chmod +x build-ubuntu-23.sh
./build-ubuntu-23.sh
@import Darwin;
@import Foundation;
@import IOKit;
// clang -fmodules -o i2cwrite i2cwrite.m && ./i2cwrite
typedef CFTypeRef IOAVServiceRef;
extern IOAVServiceRef IOAVServiceCreate(CFAllocatorRef allocator);
extern IOReturn IOAVServiceCopyEDID(IOAVServiceRef service, CFDataRef* x2);
// outputBufferSize must be less than (1 << 12) (4096 bytes)
@tao-j
tao-j / brt.m
Last active September 2, 2023 02:17
M1 External Monitor Brightness Control over DDC
@import Darwin;
@import Foundation;
@import IOKit;
// clang -fmodules -o brt brt.m && ./brt
// credit to @zhuowei for discovering the following APIs
typedef CFTypeRef IOAVServiceRef;
extern IOAVServiceRef IOAVServiceCreate(CFAllocatorRef allocator);
extern IOReturn IOAVServiceCopyEDID(IOAVServiceRef service, CFDataRef* x2);
@Lili1228
Lili1228 / convert.sh
Last active September 1, 2023 17:54
Convert Manjaro to Arch
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Tested on freshly installed Manjaro 22.0.5 Gnome.
pamac build trizen
cat >/tmp/convert.sh <<EOF
pacman -Qq | grep pamac | xargs pacman -Rs --noconfirm manjaro-application-utility
pacman -Rdd manjaro-release bashrc-manjaro manjaro-keyring python-manjaro-sdk
pacman -U https://www.archlinux.org/packages/core/x86_64/{lsb-release,pacman{,-mirrorlist}}/download/
mv /etc/pacman.d/mirrorlist.pacnew /etc/pacman.d/mirrorlist
@waiyanwh
waiyanwh / config.toml
Last active November 18, 2021 14:14
VMware vSphere Gitlab Runner Autoscale Config (docker-machine)
concurrent = 4
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "autoscale-runner"
url = "https://gitlab.com/"
token = "<YOUR TOKEN HERE>"
@hagmonk
hagmonk / install.md
Created July 6, 2019 23:58
K3OS on Raspberry Pi

Imaging

Assuming macOS and an SD card presented as /dev/rdisk3:

For ARMv7 (Pi 2):

diskutil unmountDisk disk3
xzcat ubuntu-18.04.2-preinstalled-server-armhf+raspi2.img.xz | sudo dd of=/dev/rdisk3 bs=32m
@jonathantneal
jonathantneal / recovery.sh
Last active November 10, 2023 01:01
Create or update macOS Big Sur (or Catalina, or Mojave) Recovery Partition Without Reinstalling
#!/bin/sh
# Set the macOS installer path as a variable
MACOS_INSTALLER="/Applications/$(ls /Applications | grep "Install macOS")"
MOUNT_POINT="$MACOS_INSTALLER/Contents/SharedSupport"
echo "macOS installer is \"$MACOS_INSTALLER\""
# Set the target disk as a variable
TARGET=$(diskutil info "$(bless --info --getBoot)" | awk -F':' '/Volume Name/ { print $2 }' | sed -e 's/^[[:space:]]*//')
echo "Target disk is \"$TARGET\""
@henning
henning / create-kube-user.sh
Created September 27, 2017 12:25
create k8s user, certificate, permissions and client config
#!/bin/bash
CLUSTERNAME=mycluster.mydomain
NAMESPACE=default
USERNAME=myclusteruser
GROUPNAME=mygroup
openssl genrsa -out ${USERNAME}.key 2048
CSR_FILE=$USERNAME.csr
@vadviktor
vadviktor / etc.fstab
Last active February 3, 2019 09:08
Ubuntu guest VMware shared folders using open-vm-tools package and vmhgfs-fuse
.host:/vmshared /mnt/vmshared fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,auto_unmount,defaults 0 0
@Cosmo
Cosmo / m3u.swift
Last active August 21, 2023 09:59
Swift M3U Parser
struct MediaItem {
var duration: Int?
var title: String?
var urlString: String?
static func parseM3U(contentsOfFile: String) -> [MediaItem]? {
var mediaItems = [MediaItem]()
contentsOfFile.enumerateLines({ line, stop in
if line.hasPrefix("#EXTINF:") {
let infoLine = line.stringByReplacingOccurrencesOfString("#EXTINF:", withString: "")