Skip to content

Instantly share code, notes, and snippets.

@1951FDG
1951FDG / launch_mac.sh
Last active October 16, 2021 13:10
BubbleUPnP Server
#!/bin/sh
JAVACMD="/usr/bin/java"
HOMEDIR="$(dirname "${0}")"
cd "${HOMEDIR}"
# It is necessary to trap SIGTERM to return exit code 0 to launchd
@1951FDG
1951FDG / README.md
Last active September 6, 2023 10:24
Share on LinkedIn via LinkedIn REST API using PostMan
Param
(
[Parameter(Mandatory=$true)][alias('org','OktaOrg')][string]$oOrg
)
$groups = oktaGetGroupsAll -oOrg $oOrg
foreach ($g in $groups)
{
if ($g.objectClass -eq 'okta:user_group')
#####################################
## http://kunaludapi.blogspot.com
## Version: 1.2
## Tested this script successfully on
## 1) Powershell v3
## 2) Windows 2012
## 3) Email support
##
#####################################
Param (
[string]$oldDomain = "{OLDDOMAIN}",
[string]$newDomain = "{NEWDOMAIN}",
[string]$SearchBase = "{SEARCHBASE}"
)
Write-Verbose "$(Get-Date): Loading ActiveDirectory module..."
Try { Import-Module ActiveDirectory -ErrorAction Stop }
Catch { Write-Host "Unable to load Active Directory module, is RSAT installed?" -ForegroundColor Red; Exit }
#!/bin/bash
## declare an array variable
declare -a arr=("IE8 - Win7" "IE9 - Win7" "IE10 - Win7" "IE11 - Win7" "IE11 - Win8.1" "MSEdge - Win10TH2")
## now loop through the above array
for i in "${arr[@]}"
do
VBoxManage setextradata "$i" GUI/LastCloseAction
VBoxManage setextradata "$i" GUI/LastGuestSizeHint
#!/bin/bash
# Uninstall Script
if pgrep -x "Mail" > /dev/null; then
echo 'Mail is running, quit Mail first!';
exit 2
fi
if pgrep -x "Contacts" > /dev/null; then
import requests
import pprint
import json
import codecs
file = codecs.open('python.csv', 'r', "utf-8")
list = file.read().split('\r\n')
# Set the organization id
id = '{id}'
import pprint
import codecs
file = codecs.open('1.csv', 'r', "utf-8")
list = file.read().split('\r\n')
file2 = codecs.open('2.csv', 'r', "utf-8")
list2 = file2.read().split('\r\n')
output = []
@1951FDG
1951FDG / asuswrt-merlin.md
Last active May 1, 2024 02:52
Instructions for installing and configuring Squid caching proxy server on Asuswrt-Merlin

Setup Entware on Asuswrt-merlin

Entware is a modern alternative to Optware.

For those unfamiliar with Optware: it's a software repository that offers various software programs that can be installed on your router. They allow you to add new functionality to your router (provided you have the know-how to properly configure them).

Entware system library is specially modified (patched) so that standard linux files that are normally located in /etc directory are now located in /opt/etc/ directory. To simplify things let's consider /etc/passwd file. On Asuswrt-merlin it normally looks something like:

admin:x:0:0:admin:/root:/bin/sh

nas:x:100:100:nas:/dev/null:/dev/null