Skip to content

Instantly share code, notes, and snippets.

View Zeitwaechter's full-sized avatar

John Doe Zeitwaechter

  • Germany
View GitHub Profile
@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 / 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 / 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 / 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
@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
@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 / 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"

All of this is untested/work in progress

Composer Auth File

nano ~/.config/composer/auth.json

driver=nl80211
######################### basic hostapd configuration ##########################
#
interface=blue0
country_code=DE
ieee80211d=1
ieee80211h=1
ieee80211w=0
channel=36
hw_mode=a