Skip to content

Instantly share code, notes, and snippets.

@DRN88
DRN88 / snmpwalk
Created March 16, 2018 09:18
External check for zabbix. snmpwalk wrapper
#!/bin/bash
# Drop me into: /usr/lib/zabbix/externalscripts
# Zabbix usage
# snmpwalk["OID","{HOST.CONN}","{$SNMPARGS}"]
#
if [ $# -gt 1 ]; then
/bin/snmpwalk -OQvs ${3} ${2} ${1}
else
echo "Error: No parameter specified."
@DRN88
DRN88 / OnePlusOne-LineageOS-17.1
Created August 13, 2020 09:09
OnePlusOne-LineageOS-17.1
Updating everything on OnePlus One (bacon) Windows 10
This will erase ALL your data, so your phone will be completely empty
1. Backup all your stuff, photos, etc.
2. Download latest files to your PC:
* TWRP: https://eu.dl.twrp.me/bacon/
* LineageOS: https://download.lineageos.org/bacon
* Gapps Android 10 ARM PICO version: https://opengapps.org/
* Android platform tools (adb): https://developer.android.com/studio/releases/platform-tools
@DRN88
DRN88 / Micropython esp-open-sdk build esp toolchain esp8266 espressif ubuntu 20.04.md
Created August 26, 2021 00:30
Micropython esp-open-sdk build esp toolchain esp8266 espressif ubuntu 20.04
@DRN88
DRN88 / tampermonkey_extract_tradingview_data
Last active November 27, 2021 18:26
Extract tradingview data with tampermonkey script
// ==UserScript==
// @name Extract TradingView Databox on keypress
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.tradingview.com/chart/IQRwR53e/?symbol=USI%3APCC
// @icon https://www.google.com/s2/favicons?domain=tradingview.com
// @grant none
// @run-at document-end
@DRN88
DRN88 / laravel-alpinejs-blade-template-show-hide-table-row-click-event.blade.php
Last active June 12, 2023 09:00
Laravel AlpineJS Blade template show/hide table row on click event.
//
// This is a blade component which contains 2 <tr> rows. In the first row you click on the product name, the second row should show/hide. (toggle)
// x-cloak will hide <tr> during page load, so it won't "blink".
//
//
@props([
'sku' => null,
'name' => null,
'mpn' => null,
@DRN88
DRN88 / HowTo Laravel 10 SymfonyMailerHandler Monolog Dependency Injections with Service Container.md
Last active December 22, 2023 13:08
HowTo Laravel 10 SymfonyMailerHandler Monolog Dependency Injections with Service Container

HowTo Laravel 10 SymfonyMailerHandler Monolog Dependency Injections with Service Container

https://laravel.com/docs/10.x/container#binding-primitives

Having issues with php artisan config:cache, saying it's unserializable? Say no more!

  1. Remove any objects from config/logger.php. See below.
  2. Inject mailer dependencies with AppServiceProvider.php
  3. Note: env() variables does not work in AppServiceProvider.php. Define your variables somewhere, then use config() to access them.

$mailer and $email variables are the given class' (defined in when()) constructor arguments.