I hereby claim:
- I am msmorul on github.
- I am msmorul (https://keybase.io/msmorul) on keybase.
- I have a public key ASC-Kx4yYIAj2zC6DtVGexYDLEuDiAMXxFnsWhG0d-d30wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| $user = "NT User:S-1-5-21-579602563-1105609867-1454996784-1641" | |
| $mailbox = "someuser@contoso.com" | |
| $folders = @(Get-MailboxFolderStatistics $mailbox | Where {!($exclusions -icontains $_.FolderPath)} | Select FolderPath) | |
| foreach ($origFolder in $folders) { | |
| $id = $mailbox + ":" + $origFolder.FolderPath.Replace('/','\') | |
| # Uncomment this to list all unattached sids | |
| # get-MailboxFolderPermission -Identity $id | where {$_.user -like "*S-1-5*"} | |
| # Remove dead permissions | |
| if ($perm = get-MailboxFolderPermission -Identity $id -user $user -ErrorAction SilentlyContinue) { | |
| remove-MailboxFolderPermission -Identity $id -user $user -Confirm:$false -ErrorAction STOP |
| function getMonday { | |
| $days="Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday" | |
| return (Get-Date).AddDays(-([array]::IndexOf($days,(Get-Date).DayOfWeek.ToString())-1)) | |
| } |
| /* | |
| * File: main.c | |
| * Author: toaster | |
| * | |
| * Created on November 5, 2015, 8:45 PM | |
| */ | |
| #include <xc.h> /* XC8 General Include File */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> |
| param ( | |
| [string]$username = $(throw "-username is required.") | |
| ) | |
| # | |
| # Load Account Details | |
| # | |
| $user = Get-ADObject -Filter {(sAMAccountName -eq $username)} -Properties 'ObjectSID','uidNumber' | |
| $sidStr = $user.ObjectSID | |
| "Found ObjectSID: {0} for {1}" -f $sidStr,$username | |
| # |
| import RPi.GPIO as GPIO | |
| import time | |
| from pygame import mixer | |
| import random | |
| GPIO.setmode(GPIO.BCM) | |
| TRIG = 23 | |
| ECHO = 24 | |
| # | |
| # background music |
| # | |
| # Print a summary of disk usage in the supplied directory | |
| # -directory <directory> | |
| # | |
| Param( | |
| [parameter(Mandatory=$true)] | |
| [alias("d")] | |
| $directory | |
| ) |
| // based on the grid from: http://knockoutjs.com/examples/resources/knockout.simpleGrid.3.0.js | |
| // configuration: columns: {headerText, rowText (fn or property name,) headerClass, cellTemplate} | |
| (function () { | |
| // Private function | |
| function getColumnsForScaffolding(data) { | |
| if ((typeof data.length !== 'number') || data.length === 0) { | |
| return []; | |
| } | |
| var columns = []; | |
| for (var propertyName in data[0]) { |
| --- class.smbAccessDriver.php.orig 2014-10-23 11:15:47.699206429 -0400 | |
| +++ class.smbAccessDriver.php 2014-10-23 11:21:50.423194343 -0400 | |
| @@ -86,16 +86,33 @@ | |
| require_once(AJXP_BIN_FOLDER."/pclzip.lib.php"); | |
| $filePaths = array(); | |
| foreach ($src as $item) { | |
| - $realFile = call_user_func(array($this->wrapperClassName, "getRealFSReference"), $this->urlBase.(($item[0] == "/")? "" : "/").AJXP_Utils::securePath($item)); | |
| - $basedir = trim(dirname($realFile))."/"; | |
| - $filePaths[] = array(PCLZIP_ATT_FILE_NAME => $realFile, | |
| - PCLZIP_ATT_FILE_NEW_SHORT_NAME => basename($item)); |
| #!/usr/bin/python | |
| # | |
| # Convert windows sid to centrify express generated uid | |
| # http://community.centrify.com/t5/DirectControl-Express-for-UNIX/RE-Evaluating-Centrify-Express-Now-And-Have-Some-Questions/td-p/3174 | |
| import argparse | |
| import re | |
| def sid(value): | |
| sidrx = re.compile('^S-1-5-\d{2}-\d+-(\d{4,10})-\d+-(\d+)$') | |
| m = sidrx.match(value) |