Skip to content

Instantly share code, notes, and snippets.

View heinrich-ulbricht's full-sized avatar
🎯
Building WikiTraccs - Confluence to SharePoint migrations

Heinrich Ulbricht heinrich-ulbricht

🎯
Building WikiTraccs - Confluence to SharePoint migrations
View GitHub Profile
@psignoret
psignoret / Manage-AzureADPSAppRoleAssignments.ps1
Created February 8, 2018 20:38
Add or remove application permissions to a client application.
<#
.SYNOPSIS
Grants (or removes) application permissions (app role assignments) to a client application.
.PARAMETER ClientId
The AppId or one of the ServicePrincipalNames of the client service principal.
.PARAMETER Permissions
A hashtable where the key is an identifier for the resource (either the AppId or one of the
ServicePrincipalNames) and the value is the space-separated list of app roles desired.
@benkulbertis
benkulbertis / cloudflare-update-record.sh
Last active March 4, 2024 11:27
Cloudflare API v4 Dynamic DNS Update in Bash
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)
@bmcculley
bmcculley / rppg.php
Created January 6, 2014 18:43
Random pronounceable password generator
<?php
/*
* Random pronounceable password generator
*
* Found the orignal function here http://bit.ly/1iKeLBO
* Added in a capital letter.
*/
function rppg(){
$pw = '';
@dschep
dschep / gist:4719355
Last active May 10, 2019 21:43
Hardening Synology DSM SSL

Synology DSM 4.1 is vulnerable to BEAST and the Lucky Thirteen attacks out of the box. Switching to RC4 ciphers makes these attacks, and any other future CBC-targeting attacks, not work.

To fix this these 2 files need to be updated:

/usr/syno/apache/conf/extra/httpd-alt-port-ssl-setting.conf
/usr/syno/apache/conf/extra/httpd-ssl.conf-common

Update them such that the line starting with SSLCipherSuite is replaced with these two lines:

SSLHonorCipherOrder On
@conradz
conradz / credentials.js
Created September 26, 2012 21:04
Windows 8 User Credentials
var CREDENTIAL_NAME = "<Your Credential Resource Name>";
var signin = new WinJS.Promise(function (comp, err) {
var vault = new Windows.Security.Credentials.PasswordVault();
try {
var stored = vault.findAllByResource(CREDENTIAL_NAME);
if (stored.length > 0) {
stored = stored[0];