Skip to content

Instantly share code, notes, and snippets.

View msoler8785's full-sized avatar
🤌
When you do things right, people won't be sure you've done anything at all.

Matt Soler msoler8785

🤌
When you do things right, people won't be sure you've done anything at all.
View GitHub Profile
@msoler8785
msoler8785 / README.md
Created December 15, 2021 19:14
How to install Unifi Network application to Program Files on Windows

The Problem

Many people want to install Unifi into the Program Files folder on Windows.
By default the installer installs into the current users profile folder.

For some reason there isn't any information on how to do this. Many people come up with all kinds of hacks such as using symlinks to achieve the same effect.

The Solution

In reality the UniFi-installer.exe is a Nullsoft NSIS installer that accepts the standard command line argument for specifying a directory

Just run this command and it will install it into the specified directory:

static class NativeMethods
{
///
/// Reboot the computer
///
public static void Reboot()
{
IntPtr tokenHandle = IntPtr.Zero;
@pniel-cohen
pniel-cohen / app.module.ts
Last active November 18, 2019 20:18 — forked from katowulf/app.component.ts
Dynamically set page title based on active route in Angular 4
import ...
@NgModule({
...
providers: [ TitleService ],
})
export class AppModule {
constructor(titleService: TitleService) {
titleService.init();
}
@msoler8785
msoler8785 / Create-PtrRecords.ps1
Last active July 4, 2024 00:57
Quick PowerShell script to automate PTR Record creation for existing forward lookup zones.
# Creates PTR Records for all A Records in the specified -ZoneName.
# Uses a Class A Subnet for the reverse zone.
$computerName = 'dns-server01';
# Get all the DNS A Records.
$records = Get-DnsServerResourceRecord -ZoneName 'zone.example.com' -RRType A -ComputerName $computerName;
foreach ($record in $records)
{
# The reverse lookup domain name. This is the PTR Response.
$ptrDomain = $record.HostName + '.zone.example.com';
@griggheo
griggheo / check_pingdom_and_post_cachet_status.go
Created October 13, 2015 23:28
Golang program which integrates Pingdom checks into a Cachet status page
package main
import (
"github.com/russellcardullo/go-pingdom/pingdom"
"fmt"
"time"
)
const PINGDOM_USERNAME="xxxx"
@hacksalot
hacksalot / gist:72517b9b1c145116e89e
Created March 17, 2015 02:01
Delete GitHub wiki revisions
# Delete prior revisions from a GitHub wiki so that only the most-recent
# version of the content is available.
# Clone the wiki.
git clone https://github.com/[user]/[repo].wiki.git
# Remove the .git folder.
rm -rf .git
# Reconstruct the local repo with only latest content