This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* mypay-findleave.js | |
Javascript Snippet to find source of leave balances | |
*/ | |
var docs = new Array(); | |
var leaves = new Map(); | |
var balances = new Map(); | |
var gains = new Map(); | |
async function getLes() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# Update or add an AAAA record for your local machine using cloudflare API | |
# Required: Set DOMAIN to your domain and KEY to your cloudflare API token | |
# Note: This uses Linux iproute2 for getting the IPv6 address | |
import requests | |
import xml.etree.ElementTree as ET | |
import socket | |
import os | |
import sys | |
import json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* aetna-eob.js | |
Javascript Snippet to bulk download Aetna EOB | |
to a ZIP file | |
*/ | |
const LIMIT=-1; // set -1 for no limit (2 years on server) | |
/* JSZip */ | |
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=t()}}(function(){return function s(a,o,h){function u(r,t){if(!o[r]){if(!a[r]){var e="function"==typeof require&&require;if(!t&&e)return e(r,!0);if(l)return l(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[r]={exports:{}};a[r][0].call(n.exports,function(t){var e=a[r][1][t];return u(e||t)},n,n.exports,s,a,o,h)}return o[r].exports}for(var l="function"==typeof require&&require,t=0;t<h.length;t++)u(h[t]);return u}({1:[function(t,e,r){"use strict";var c=t("./utils"),d=t("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.enc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disables proxy | |
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name AutoConfigURL | |
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyEnable -Value 0 | |
# From https://github.com/majkinetor/posh/blob/master/MM_Network/Update-Proxy.ps1: | |
# The registry changes aren't seen until system is notified about it. | |
# Without this function you need to open Internet Settings window for changes to take effect. See http://goo.gl/OIQ4W4 | |
function refresh-system() { | |
$signature = @' | |
[DllImport("wininet.dll", SetLastError = true, CharSet=CharSet.Auto)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to export config (with secrets) to Oracle Cloud bucket | |
:local oracleurl "https://XXXXX.oci.customer-oci.com/p/XXX/XXXX/o/" | |
:local hostname ([/system identity get name]) | |
:local date [/system clock get date] | |
:local time [/system clock get time] | |
:local filename ($hostname . "-" . $date . "-" . [:pick $time 0 2] . [:pick $time 3 5] .[:pick $time 6 8] . ".rsc") | |
:local url ($oracleurl . $hostname . "/" . $filename ) | |
/export file=$filename show-sensitive | |
:delay 1000ms | |
:local data [/file get [/file find name=$filename] contents]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* mypay.js | |
Javascript Snippet to bulk download everything in MYPAY | |
to a ZIP file | |
*/ | |
/* JSZip */ | |
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=t()}}(function(){return function s(a,o,h){function u(r,t){if(!o[r]){if(!a[r]){var e="function"==typeof require&&require;if(!t&&e)return e(r,!0);if(l)return l(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[r]={exports:{}};a[r][0].call(n.exports,function(t){var e=a[r][1][t];return u(e||t)},n,n.exports,s,a,o,h)}return o[r].exports}for(var l="function"==typeof require&&require,t=0;t<h.length;t++)u(h[t]);return u}({1:[function(t,e,r){"use strict";var c=t("./utils"),d=t("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,i,n,s,a,o,h=[],u=0,l=t.len |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[System.DirectoryServices.DirectorySearcher] $searcher = New-Object System.DirectoryServices.DirectorySearcher | |
$user = $env:UserName | |
$now = Get-Date | |
function UpdateCert($username, $newcert) { | |
$searcher.Filter = "(&(objectCategory=User)(sAMAccountName=$username))" | |
$searchresults = $searcher.FindAll() | |
if($searchresults.Length -ne 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[System.DirectoryServices.DirectorySearcher] $searcher = New-Object System.DirectoryServices.DirectorySearcher | |
$user = $env:UserName | |
$now = Get-Date | |
function UpdateCert($username, $newcert) { | |
$searcher.Filter = "(&(objectCategory=User)(sAMAccountName=$username))" | |
$searchresults = $searcher.FindAll() | |
if($searchresults.Length -ne 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
<head><title>JS TOTP</title> | |
<style> | |
.styled-table { | |
border-collapse: collapse; | |
margin: 25px 0; | |
font-size: 1.2em; | |
font-family: monospace; | |
min-width: 400px; | |
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# Update or add an AAAA record for your local machine using namesilo API | |
# Required: Set DOMAIN to your domain and KEY to your Namesilo API key | |
# Note: This uses Linux iproute2 for getting the IPv6 address | |
# Usage: ./namesilo-update46.py | |
# -4 for IPv4, -6 for IPv6, or both <hostname - optional> | |
import requests | |
import xml.etree.ElementTree as ET | |
import socket | |
import os |
NewerOlder