Skip to content

Instantly share code, notes, and snippets.

View 1ARdotNO's full-sized avatar

Einar Stenberg 1ARdotNO

View GitHub Profile
@1ARdotNO
1ARdotNO / addCodeowners.ps1
Last active April 26, 2023 00:59
add codeowners to github repo
param (
[Parameter(Mandatory = $true)] $repoName,
[Parameter(Mandatory = $true)] $teamName, #allows multiple teams speatated by comma
[Parameter(Mandatory = $true)] $orgName,
$CodeOwnerTeam, #allows multiple teams speatated by comma, use this to define what team has the rights to change the codeowners file itself
$branch, #if not specified default branch is used
[switch]$overwrite, #automatically overwrite the existing CODEOWNERS FILE
[switch]$addperms, #automatically add the required perm for the select team. WILL OVERWRITE CURRENT PERMISSIONS
[switch]$enablebranchprotectioncodeowners #automatically add the required perm for the select team. WILL OVERWRITE CURRENT PERMISSIONS
)
@1ARdotNO
1ARdotNO / zerotier-usg.sh
Created December 7, 2022 14:43
Install zerotier on Unifi USG
# related to bug https://github.com/zerotier/ZeroTierOne/issues/1553
mkdir -p /config/data/firstboot/install-packages
cd /config/data/firstboot/install-packages
curl https://download.zerotier.com/dist/ubiquiti/zerotier-one_mips64.deb --output /config/data/firstboot/install-packages/zerotier-one.deb
mv zerotier-one.deb zerotier-one-xz.deb
ar -x zerotier-one-xz.deb
xz --decompress control.tar.xz
xz --decompress data.tar.xz
@1ARdotNO
1ARdotNO / meshgentoken.js
Created August 22, 2022 12:44
improve mesgentoken to account for slight time variations between hosts
// Generates a MeshCentral login token
//
// Start by running the following on your server to get the login key:
//
// node node_module/meshcentral --LoginTokenKey
//
// You can also run the following command to get a list of user identifiers
//
// node node_module/meshcentral --ListUserIDs
//
@1ARdotNO
1ARdotNO / resume.json
Last active June 28, 2022 19:59
resume.json
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Einar Stenberg",
"label": "IT-Manager",
"image": "https://avatars.githubusercontent.com/u/14344702?v=4",
"email": "einar@stenberg.cloud",
"phone": "",
"url": "http://1AR.NO/",
"summary": "",
### Keybase proof
I hereby claim:
* I am ovrap3x on github.
* I am einars (https://keybase.io/einars) on keybase.
* I have a public key ASBFaW840KF510wRzHO7y-aAtub4yskSd3-UFiqRdgaKrQo
To claim this, I am signing this object: