Skip to content

Instantly share code, notes, and snippets.

View djekl's full-sized avatar
:octocat:
Working from home

Alan Wynn djekl

:octocat:
Working from home
View GitHub Profile
@djekl
djekl / CompleteDiscordQuest.md
Created April 26, 2024 15:21 — forked from aamiaa/CompleteDiscordQuest.md
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
@djekl
djekl / setuplinkaggregationunraid.md
Created November 28, 2023 22:43 — forked from sems/setuplinkaggregationunraid.md
Setup guide link aggregation(802.3ad) Unraid with Ubiquiti

Setup guide link aggregation Unraid with Ubiquiti

Introduction

I am writing this guide becuase I coudn't find a proper one online which contained all the information I was searching for. I will try to guide you through the process of enabling link aggregation (802.3ad) with your Ubiquiti hardware and your Unraid server. Note: not all of Ubiquiti's hardware supports link aggregation (LAG). As of the time of writing Ubiquiti states the following.

Applicable to all UniFi Switch models excluding the USW-Flex and USW-Flex-Mini.

Source: Ubiquiti

@djekl
djekl / plexdrive.plg
Last active January 30, 2023 19:20
Unraid PlexDrive Plugin
<?xml version='1.0' standalone='yes'?>
<!-- PLUGIN DEFINITIONS -->
<!DOCTYPE PLUGIN [
<!ENTITY name "plexdrive">
<!ENTITY author "djekl">
<!ENTITY version "2023.01.27">
<!ENTITY pdversion "latest">
<!ENTITY repo "https://github.com/plexdrive/plexdrive/releases">
<!ENTITY pluginURL "https://gist.githubusercontent.com/&author;/6336a86e87746bf736489733ad13b52c/raw/fe055e9023d7308d2b14408154ad755792196993/plexdrive.plg">
@djekl
djekl / compare_postfix_ssha512_hash.php
Last active November 15, 2022 23:47
This is how you generate and compare a Postfix Salted SHA512 Hash in PHP. It assumes you have used an 8bit salt for your hash. Tested here on all PHP versions - https://3v4l.org/8qtW0
<?php
$password = "chemicals1";
$expected = "{SSHA512}w/lHn2LXfNletbfyLVYutBFqUjGPzhmptyleVlehUZSZdylZCt/sDmvkhTBV1Ln4f6rzXTdM6eOGr3LX7FgGCF5/fsbs0vVq";
function generate_postfix_ssha512_hash($password, $salt = false) {
$hash_algo = "{SSHA512}";
$salt_length = 8;
// generate a random salt if one isn't provided
@djekl
djekl / video_details.php
Created June 21, 2013 15:50
Get Video Details from YouTube or Vimeo
<?php
$urls = array();
$videos = array();
// vimeo test
$urls[] = 'http://vimeo.com/6271487';
$urls[] = 'http://vimeo.com/68546202';
// youtube test
@djekl
djekl / clipboard.js
Created October 12, 2021 11:02 — forked from stevebauman/clipboard.js
Copy Rich Text to Clipboard Cross Platform & Browser
/**
* Copy rich text content to clipboard.
*
* Must be initiated by a user click event.
*
* @param {string} content
*/
export default function (content) {
const selection = window.getSelection();
@djekl
djekl / mac-network-commands-cheat-sheet.md
Created September 22, 2021 17:17 — forked from jjnilton/mac-network-commands-cheat-sheet.md
Mac Network Commands Cheat Sheet

Disclaimer: I'm not the original author of this sheet, but can't recall where I found it. If you know the author, please let me know so I give the attribution.

Note: Since this seems to be helpful to some people, I formatted it to improve readability of the original. Also, note that this is from 2016, many things may have changed, and I don't use macOS anymore, so I probably can't help in case of questions, but maybe someone else can.

Mac Network Commands Cheat Sheet

After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and stay salty.

Get an ip address for en0:

@djekl
djekl / stripe_sub_wo_cc.php
Created July 30, 2014 20:06
Laravel Cashier Free Subscription w/o Credit Card Filter
<?php
Route::filter('stripe.plans.free', function() {
if (Auth::guest() || Auth::user()->subscribed()) {
return;
}
$user = Auth::user();
$chosenPlan = 'free';
@djekl
djekl / CurlRequest.php
Created June 18, 2014 13:25
Example Curl Class Wrapper
<?php
class CurlRequest
{
private $api_key;
private $ch;
public function __construct($api_key)
{
$this->api_key = $api_key;
@djekl
djekl / callum-parkinson-website-prototype.markdown
Created June 19, 2020 15:30
Callum Parkinson Website Prototype