Skip to content

Instantly share code, notes, and snippets.

Avatar
🐻
tfw GitHub has statuses

Brandon Log1x

🐻
tfw GitHub has statuses
View GitHub Profile
@Log1x
Log1x / Rating.php
Last active Dec 1, 2020
Rating component
View Rating.php
<?php
namespace App\View\Components;
use Roots\Acorn\View\Component;
class Rating extends Component
{
/**
* The rating value.
@Log1x
Log1x / README.md
Last active Apr 6, 2021
Uptime Robot Discord Webhook
View README.md

Uptime Robot Webhook for Discord

Screenshot

Configuration

  • Alert Contact Type: Web-Hook
  • URL to Notify: https://discordapp.com/api/webhooks/CHANGEME/CHANGEME?
    • Must end with ?
@Log1x
Log1x / Slack.sh
Created Apr 16, 2020
Discord Notification Webhook for unRAID
View Slack.sh
#!/bin/bash
# Replace Slack.sh in /boot/config/plugins/dynamix/notifications/agents
# Set to your Discord webhook token.
WEBHOOK="https://discordapp.com/api/webhooks/ID/TOKEN"
curl "$WEBHOOK" \
-X "POST" \
-H 'Content-Type: application/json' \
--data @<(cat <<EOF
@Log1x
Log1x / Win10.preset
Created Feb 8, 2020
Recommended Windows 10 Performance Preset
View Win10.preset
# See: https://github.com/Disassembler0/Win10-Initial-Setup-Script
### Require administrator privileges ###
RequireAdmin
### Privacy Tweaks ###
DisableTelemetry # EnableTelemetry
DisableWiFiSense # EnableWiFiSense
DisableSmartScreen # EnableSmartScreen
DisableWebSearch # EnableWebSearch
@Log1x
Log1x / application.php
Last active Apr 3, 2020 — forked from swalkinshaw/application.php
Trellis + Sentry
View application.php
<?php
/**
* composer require sentry/sentry-sdk
*/
Env::init();
// ...
if (env('SENTRY_DSN') && env('WP_ENV') !== 'development') {
@Log1x
Log1x / windows.md
Last active Apr 3, 2020
Some stuff I use on Windows
View windows.md

Windows Setup

Screenshot

This contains various software and tools I use for customizing Windows.

Warning: Installing a bad Windows theme can render your system unusable (dwm.exe crash-loop – "black screen of death") due to resource map changes.

  • Always match your winver.exe build to the theme you're installing.
  • Before major build updates, always change back to a default windows theme.
@Log1x
Log1x / vanilla.js
Created Mar 11, 2019
Here lives a beautiful, elegant library to help you get started with vanilla Javascript. Made with ❤️ by Log1x
@Log1x
Log1x / functions.php
Created Mar 7, 2019
Remove noopener & noreferrer on WordPress links
View functions.php
/**
* Remove rel="noopener noreferrer" in TinyMCE links
*
* @param array $init
* @return array
*/
add_filter('tiny_mce_before_init', function ($init) {
$init['allow_unsafe_link_target'] = true;
return $init;
});
@Log1x
Log1x / debloatNox.md
Last active Apr 9, 2021
Debloating & Optimizing Nox
View debloatNox.md

Debloating Nox

Nox, despite being the most feature-filled Android emulator, has a lot of negativity surrounding it due to their antics when it comes to making income off of their program. It is known for running repeated advertisments in the background, calling home and passing along system information (outside of your Android instance) as well as a vast amount of potentially sensitive data in an encrypted payload back to their multitude of servers. With the following preventitive measures, we can stop a majority of this happening as well as greatly improve the overall performance.

  1. Download and Install a fresh copy of Nox. The latest version is fine (for now). If you already have it installed, that is fine too. No need to reinstall.

  2. Enable Root Mode on Nox by clicking the gear icon and then checking the Root Startup box.

  3. Install a new Launcher from the Play Store. ANYTHING but Nox's default. I suggest [Nova Launcher](https://play.google.com/s

@Log1x
Log1x / countdown.js
Created Jan 22, 2019
Vanilla JS Countdown Timer
View countdown.js
/**
* Countdown
*/
function init() {
const second = 1000,
minute = second * 60,
hour = minute * 60,
day = hour * 24;
const date = document.querySelector('[data-date]').dataset.date;