Skip to content

Instantly share code, notes, and snippets.

View RichardFevrier's full-sized avatar
:bowtie:

Richard Février RichardFevrier

:bowtie:
View GitHub Profile
@RichardFevrier
RichardFevrier / 1_ .clang-format
Last active August 14, 2019 12:04
ObjC cleaning
BasedOnStyle: LLVM
BreakBeforeBraces: Linux
ColumnLimit: 135 # fine with a macbook pro 15" screen
IndentWidth: 4
IndentWrappedFunctionNames: true
MaxEmptyLinesToKeep: 2
ObjCBinPackProtocolList: Always
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
@RichardFevrier
RichardFevrier / git_lfs_cleaner.rb
Last active August 26, 2019 14:53
Git LFS cleaner
#!/usr/bin/ruby
Dir.glob("**/*/") do |filepath|
if File.exist?("#{filepath}.git/lfs/")
`cd #{Dir.pwd}/#{filepath} && git lfs prune`
end
end
@RichardFevrier
RichardFevrier / git_cleaner.rb
Last active August 26, 2019 14:52
Git cleaner
#!/usr/bin/ruby
Dir.glob("**/*/") do |filepath|
if File.exist?("#{filepath}.git/")
`cd #{Dir.pwd}/#{filepath} && git gc`
end
end
#!/usr/bin/env -S python3 -u
# -*- coding: utf-8 -*-
import subprocess
def _main() -> None:
installed_fedora_app_ids: list[str] = []
process = subprocess.Popen(['flatpak', 'list', '--columns=application,origin'], stdout=subprocess.PIPE)
@RichardFevrier
RichardFevrier / macOS_cli_create_admin_user.sh
Last active September 29, 2023 16:54
macOS cli create admin user
#!/bin/bash
# Usage:
# sudo ID=1000 NAME=richard PASSWORD=azerty /bin/bash -c "$(curl -fsSL https://gist.github.com/RichardFevrier/6e515aaaadc5d3b72906be6f23689867/raw/macOS_cli_create_admin_user.sh)"
dscl . -create /Groups/$NAME
dscl . -create /Groups/$NAME gid $ID
dscl . -create /Users/$NAME
dscl . -create /Users/$NAME UserShell /bin/zsh