Skip to content

Instantly share code, notes, and snippets.

View orgcontrib's full-sized avatar
:octocat:
contributing

Org Contrib orgcontrib

:octocat:
contributing
View GitHub Profile
@orgcontrib
orgcontrib / hls.sh
Created November 10, 2024 10:21 — forked from stenuto/hls.sh
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
@orgcontrib
orgcontrib / fira-mono.html
Last active September 15, 2024 16:24
Mozilla's new typeface @mozilla\Fira
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<title>Rename.me</title>
<link rel="stylesheet" href="https://code.cdn.mozilla.net/fonts/fira.css">
<style>
body {
@orgcontrib
orgcontrib / Get AD account lockout from all DCs.ps1
Created August 23, 2024 20:50
Get AD account lockout from all DCs.ps1
## Get all domain controllers for current domain and retrieve AD account lock events, going back a given period in time and showing which account and where it was locked from
[System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().DomainControllers.name | % { Get-WinEvent -FilterHashtable @{ LogName = 'Security' ; Id = 4740 ; StartTime = [datetime]::Now.AddDays( -7 ) } -ComputerName $_|select timecreated,MachineName,@{n='Account';e={$_.properties[0].value}},@{n='From';e={$_.properties[1].value}}}
@orgcontrib
orgcontrib / gnome-m365.md
Last active July 6, 2024 17:41
gnome-m365

Foreword (context) video.

Microsoft 365

Custom Client ID

To setup a custom client ID, you must register a new application with Microsoft and enable the appropriate permissions.

  1. Sign up and/or login to Microsoft Entra
  2. In the sidebar select "Identity" → "Applications" → "App registrations"
  3. In the tab bar select "New registration"
@orgcontrib
orgcontrib / keybase-linux-tips.txt
Last active July 4, 2024 23:43
keybase-linux-tips
# KBFS todo post-install (#24764)
mkdir -p "$HOME/FUSE/kbfs"
keybase config set mountdir "$HOME/FUSE/kbfs"
sudo touch /etc/keybase/config.json
sudo -e /etc/keybase/config.json
# Copy/paste below config
{
"disable-root-redirector" : true
@orgcontrib
orgcontrib / sdlna.json
Last active December 1, 2023 04:33
sdlna-scoop-manifest
{
"version": "v1.0",
"license": "BSD 2-Clause",
"url": "https://github.com/nmaier/simpleDLNA/releases/download/v1.0/simpledlna-1.0.msi",
"homepage": "http://nmaier.github.io/simpleDLNA/",
"hash": "b079dbad0719f678c1b01a302f26e2d7c6267a5c36d91795e2926d994619ccef",
"bin": "sdlna.exe"
}
@orgcontrib
orgcontrib / which_interpreter_ext
Last active November 3, 2022 19:08
which $SHELL extended (src=https://bit.ly/3DDhQSt)
'echo' +"'\
@ goto dos \
[exit[if {[lsearch -exact [package names] Expect]>=0} {puts expect\ [\
package require Expect]\ (Tcl\ [info patchlevel])} elseif {[lsearch -exact [\
package names] Tk]>=0} {puts wish\ (Tcl\ [info patchlevel],\ Tk\ [package \
require Tk])} else {puts tcl\ [info patchlevel]}]]' >/dev/null ' {\">/dev/null \
">"/dev/null" +"\'";q='''=.q,';q=%[\"
echo ">/dev/null;status=0;@ {status=1};*=(" '$' ");~ $status 1&&{e='"\
"';eval catch $2 ^'&version {eval ''echo <='^ $2 ^'&version''}';exit};e='"\
"';if (eval '{let ''a^~a''} >[2] /dev/null'){e='"\
@orgcontrib
orgcontrib / index.html
Created August 31, 2022 15:44
Visualising a CSV file with Chart.js (basic)
<div id="wrapper">
<canvas id="chart"></canvas>
</div>
@orgcontrib
orgcontrib / chjdk
Last active November 3, 2022 18:17 — forked from trmaphi/changeJDK.bash
[Change system wide java version on Mac OS] Inspire by a stackoverflow answer https://stackoverflow.com/a/44169445/6730571 #bash #mac
#!/usr/bin/env bash
JDKS_DIR="/Library/Java/JavaVirtualMachines"
JDKS=( $(ls ${JDKS_DIR}) )
JDKS_STATES=()
# Map state of JDK
for (( i = 0; i < ${#JDKS[@]}; i++ )); do
if [[ -f "${JDKS_DIR}/${JDKS[$i]}/Contents/Info.plist" ]]; then
JDKS_STATES[${i}]=enable
@orgcontrib
orgcontrib / nsschk.c
Created January 27, 2022 23:33
nsschk.c
/* Compile: gcc -o nsschk nsschk.c -ldl */
/* Blog/info: http://tiny.cc/mozbigsig */
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
void bail(char *msg) {
fprintf(stderr,"%s\n",msg);
exit(1);