Skip to content

Instantly share code, notes, and snippets.

View Zeitwaechter's full-sized avatar

John Doe Zeitwaechter

  • Germany
View GitHub Profile
@Zeitwaechter
Zeitwaechter / Installing Arch Linux on Lenovo Yoga 2 Pro (2015).md
Last active July 12, 2019 20:38
Installing Arch Linux on Lenovo Yoga 2 Pro (2015/2016). Incomplete - might be continued

Installing Arch Linux on Lenovo Yoga 2 Pro

This Tutorial is based on the - via (Bit)Torrent - downloadable ISO (Version 2016-10-01) in the download overview (https://www.archlinux.org/download/) and installation via USB.

! Please do not use an older ISO than the possible downloadable listed one at the time of your Arch Linux installation.

Note: This tutorial describes only one way and might not be valid any more for further versions of Arch Linux. There are many other ways how to do it.

Note2: The Arch Linux Wiki is the best documentation I have ever seen so far so I totally recommend it in case of need: https://wiki.archlinux.org/index.php/Main_page

@Zeitwaechter
Zeitwaechter / init.d-bridge
Last active May 6, 2018 20:21
ipfire bridge green0
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/bridge
#
# Description : Skript to use more than one NIC's as green net
#
# Authors : Arne Fitzenreiter - arne_f@ipfire.org
#
# Version : 01.00
#
@Zeitwaechter
Zeitwaechter / 00-install-arch-linux-2024.md
Last active May 2, 2024 22:02
Installing Arch Linux (Encrypted) on a device 2024 (with a few extras)

To backup your old system:

  • rsync -aAXhv --exclude={"/dev/*","/lost+found","/mnt/*","/media/*","/proc/*","/run/*","/sys/*","/tmp/*","*cache"} / /[TARGET]

If you want to remind yourself about how to install Arch Linux on a console that you can only access via serial console, checkout the official arch wiki article.

Or:

  • Add console=ttyS0,115200 after hitting TAB in Arch Linux Image Bootloader
@Zeitwaechter
Zeitwaechter / index.html
Created July 18, 2019 13:17 — forked from nolanlawson/index.html
Create an image/png blob, then fetch it with XHR
<html>
<body>
<h1>Create an image/png blob, then fetch it with XHR</h1>
<pre id="display"></pre>
<script src="index.js"></script>
</body>
</html>
@Zeitwaechter
Zeitwaechter / 00-executables.md
Last active April 30, 2022 18:11
Docker Scripts

All of this is untested

  1. wget https://gist.githubusercontent.com/Zeitwaechter/43f86c95d1f63c2aecf168913f11b4e9/raw/f6afeb19791dcdc72b19456d6d644c6e81bb8007/01-docker-compose-gitlab.yml
  2. docker-compose -f 01-docker-compose-gitlab.yml up

All of this is untested/work in progress

@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
# ʘ‿ʘ #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
  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)

@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