Skip to content

Instantly share code, notes, and snippets.

View Zeitwaechter's full-sized avatar

John Doe Zeitwaechter

  • Germany
View GitHub Profile
@Zeitwaechter
Zeitwaechter / pinephone-arch-linux-arm-install.md
Last active April 30, 2022 18:04
Installing Arch Linux ARM on PinePhone (v1.2b)

Installation

We will be installing this OS to the eMMC and will basically following the Pine64s wiki article. Check also that article for more information about e.g. what else is happening here (also the main article of this device, amiright?).

Requirements

@Zeitwaechter
Zeitwaechter / xorg.conf
Created September 19, 2020 14:16
Working NVIDIA VGA xorg.conf
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 450.66
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 450.66
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"

Warning

No warranties, it's all on you.

Pay attention to not touch any pins/contacts, if you do not own a enclosure/case for this RPi4 Setup.

Also.. 5 Volt stings a bit.

Now.. you have been warned.

@Zeitwaechter
Zeitwaechter / cinnamon-notifications.md
Last active May 12, 2020 21:59
Arch Linux 'nice to knows'

If you have disabled network notifications by error you can try the following commands (user shell doesn't matter):

  • gsettings set org.gnome.nm-applet disable-connected-notifications false
  • gsettings set org.gnome.nm-applet disable-disconnected-notifications false
  • gsettings set org.gnome.nm-applet disable-vpn-notifications false

Cinnamon still has no native graphical applet for this. Meh.

@Zeitwaechter
Zeitwaechter / 00-mysql-notes.md
Created May 11, 2020 08:11
LaraCon 2018 - Addendum

Taken from Kai Sassnowskis' talk at LARACON EU from 2018 source:

  • Indeces aren't used when using functions (like e.G. YEAR() or MONTH()), use e.G. BETWEEN instead.
  • If not sure what is happening, use an EXPLAIN before your statement.
  • Multi column indeces go from left to right and you can not skip columns, so the defined order in the index matters.
  • An index and a query always have to go together.
  • Inequality Operators: Which query is more important? Is the introduction of another index the right approach?
  • "Indexing is my concern", not of others
  1. Install brew
  2. run xcode-select --install
  3. run brew install rbenv ruby-build
  4. add to ~/.config/fish/config.fish to add ruby via env selection.
    set -g fish_user_paths "$HOME/.rbenv/bin" $fish_user_paths
    
    ### Executables
    ## eval "(rbenv init -)"
    

(process substitution)

# ʘ‿ʘ #happy #freshchanges
cd /home/forge/app
# (ノ◕ヮ◕)ノ*:・゚✧ Clean it up!
git diff
#git -c core.quotepath=false -c log.showSignature=false rm --cached -f -- package.json
#git -c core.quotepath=false -c log.showSignature=false rm --cached -f -- package-lock.json
git -c core.quotepath=false -c log.showSignature=false checkout HEAD -- package.json
git -c core.quotepath=false -c log.showSignature=false checkout HEAD -- package-lock.json
@Zeitwaechter
Zeitwaechter / helpers.php
Created January 29, 2020 12:12
Universal Laravel Error Logger Helper
<?php
if ( !function_exists('error_logger')) {
/**
* error_logger
*
* Returns an expanded Error Log as JSON and Logs it into the Laravel Error Logs
*
* @param \Exception $exception
* @param null|string $message

All of this is untested/work in progress