Skip to content

Instantly share code, notes, and snippets.

Avatar

Yashodhan yashodhank

  • United Kingdom
View GitHub Profile
View Emby-theater-premiere-bypass.md

DNS

/!\ I used bind9 on my local server to add mb3admin.com entry for all devices ( like android app ) Otherwise in hosts fie :

<your_server> mb3admin.com

Optionnal (electron app - Emby Theater) main.js update

C:\Users\<YOUR_USER>\AppData\Roaming\Emby-Theater\system\electronapp
Add after app.on('window-all-closed', function () { block L:18

@yashodhank
yashodhank / dexec.sh
Created May 28, 2020 — forked from tynes/dexec.sh
docker exec bash alias
View dexec.sh
# usage:
# dexec <cmd>
# uses fzf to select running container then runs
# $ docker run [selected] <cmd>
# with /bin/bash as the default cmd
# TODO: add some pretty printing
function dexec() {
local selected_image
@yashodhank
yashodhank / README.md
Created May 13, 2020 — forked from stokkes/README.md
Rclone Plex Sonarr Radarr Read&Write
View README.md

Rclone v1.40 for Plex/Sonarr/Radarr Read/Write

This small guide should help you get setup with rclone v1.40 to read/write directly to a cache mount and have Plex get notified of new tv/movies that get added to the mount by Radarr/Sonarr

Assumptions

  1. You're using rclone v1.40
  2. You're using Radarr & Sonarr
  3. If you're using docker for plex/sonarr/radrr, you must ensure the volumes attached to the containers are all the same path, i.e.: /mnt/user/media:/media for all 3. If not, the auto-scan will likely not work properly.
View Activate Office 2019 for macOS VoL.md

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@yashodhank
yashodhank / WHMCSDecryptor.php
Created Apr 27, 2020 — forked from Wruczek/WHMCSDecryptor.php
Simple PHP script to decrypt WHMCS hashed strings
View WHMCSDecryptor.php
<?php
$encoded_string = "JATa2iUqVdzCkBP5RiyitlQlUiACl8UrpJOeGUJO";
$cc_encryption_hash = "SOmECRAZYLONGHASHROFLCOPTERBBQKTHX";
echo decrypt_whmcs($encoded_string, $cc_encryption_hash);
function decrypt_whmcs($encoded_string, $cc_encryption_hash) {
$key = md5(md5($cc_encryption_hash)) . md5($cc_encryption_hash);
$hash_key = _hash($key);
$hash_length = strlen($hash_key);
@yashodhank
yashodhank / 2011-08-18_whmscripts_disabling_invoice_emails.md
Last active Apr 27, 2020 — forked from RWJMurphy/2011-08-18_whmscripts_disabling_invoice_emails.md
WHMScripts: Disabling invoice creation emails in WHMCS on a per-client basis
View 2011-08-18_whmscripts_disabling_invoice_emails.md

If you’re using WHMCS to manage your cPanel shared servers, this is probably a request that you’ve received a few times. You have clients that are set up to pay invoices automatically from their credit cards, and they’d rather not receive the “Invoice Created” or “Invoice Payment Reminder” emails every month.

Normally WHMCS only allows you to disable these emails globally but, by making use of the EmailPreSend action hook, we can set up a list of clients not to receive these.

To get started just download the following script, change the file extension to .php, edit it to set up the $client_ids and place it in your WHMCS /includes/hooks/ directory

Please note, this script doesn’t disable only the automatically sent invoice notification emails, but also blocks manual sending of these for the selected clients.

(originally posted at http://whmscripts.net/whmcs/2011/disabling-invoice-creation-emails-in-whmcs-on-a-per-client-basis/)

@yashodhank
yashodhank / docker-compose.mongo.auth.yml
Created Apr 23, 2020 — forked from keidrun/docker-compose.mongo.auth.yml
Cheat Sheet about Docker Compose For Database
View docker-compose.mongo.auth.yml
version: '3'
services:
db:
image: mongo:4.0
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
ports:
View git-clone-if-newer.sh
#!/bin/bash
set -u
# Clones and softlinks a git repo, _if needed_.
# Summary of steps:
# 1. Checks that the provided repo is valid (SSH or HTTP)
# 2. Compares local and remote commit to see if there is a new version
# 3. Clones the remote commit in local, adding -<timestamp>-<commit> to the folder name
# 4. Deletes .git directory of the cloned repo
@yashodhank
yashodhank / ansible-ufw.md
Created Apr 6, 2020 — forked from ldvc/ansible-ufw.md
Gestion UFW avec Ansible
View ansible-ufw.md

Ansible + UFW

Config

Contenu du fichier vars_ufw.yml :

---
allow_in:
  - {port: 22, proto: 'tcp'}
  - {port: 25, proto: 'tcp'}
  - {port: 53, proto: 'udp'}
@yashodhank
yashodhank / zerotier_rules.sh
Created Dec 6, 2019 — forked from key-networks/zerotier_rules.sh
Bash script to add rules to Zerotier Network Controller
View zerotier_rules.sh
#!/bin/sh
#
# ztncui - ZeroTier network controller UI
# Copyright (C) 2017-2019 Key Networks (https://key-networks.com)
# Licensed under GPLv3 - see LICENSE for details.
#
TOKEN=`sudo cat /var/lib/zerotier-one/authtoken.secret`
echo -e "This is the list of networks avaialble on this Network Controller:"
You can’t perform that action at this time.