start new:
tmux
start new with session name:
tmux new -s myname
$snapins = Get-PSSnapin -Registered | |
$snapins | Add-PSSnapin | |
Get-Module -ListAvailable | Import-Module | |
Get-PSSnapin | Format-Table -autosize PSVersion, Name | |
Get-Module | Format-Table -autosize ModuleType, Name | |
function ff ([string] $glob) { get-childitem -recurse -include $glob } |
# See best option below | |
# Option 1: Simple, but breaks with "xml" element | |
# based on an answer posted on stackoverflow by user "Start-Automating" | |
# see http://stackoverflow.com/questions/2972264/merge-multiple-xml-files-into-one-using-powershell-2-0 | |
$files = get-childitem "full path to parent directory" | |
$finalXml = "<xml>" | |
foreach ($file in $files) { | |
[xml]$xml = Get-Content $file.fullname | |
$finalXml += $xml.xml.InnerXml | |
} |
function Get-SysInternals { | |
param( | |
[parameter(Mandatory=$false)] | |
$Path = [string]$(Get-Location) + "\SysInternals\" | |
) | |
$Metadata = @{ | |
Title = "Get SysInternals" | |
Filename = "Get-SysInternals.ps1" | |
Description = "[Description]" |
# http://technet.microsoft.com/en-us/library/ee692685.aspx | |
# F7 = history | |
# Alt+F7 = history -c | |
# F8 = Ctrl+R | |
Set-Location C: | |
# Easier navigation | |
Set-Alias o start | |
function oo {start .} |
Get-ADGroupmember "" | %{Add-ADGroupMember -Identity "" -Members $_} |
Kerberos realm authentication using LDAP authorization via MS Windows Active Directory
Some details on the SAMBA configuration. Original Samba, ADS, Winbind documention was found http://gentoo-wiki.com/HOWTO_Adding_a_Samba_Server_into_an_existing_AD_Domain.
This particular installation of Samba requires a few additional packages and features to ensure that Active Directory authentication works properly. In this first step we add the necessary use flags to the Gentoo Portage package system.
<# | |
.Synopsis | |
Takes Group DNs and User DNs and sets the user(s) as managers of the group(s). | |
.DESCRIPTION | |
Only changes needed for the group's configuration to match the request are | |
made, that is if the group already has the same managers in the specified | |
positions (managedBy vs msExchCoManagedByLink) then nothing is modified. | |
If no property changes are needed but the rights aren't set correctly, | |
the necessary ACL rules are applied and extraneous rules are removed. |
# This is a powershell commandlet equivalent of build_ui.sh for installation on Windows | |
# Generate python files based on the designer ui files. pyrcc4 should be on the path. | |
# If you need to modify the python location or pyuic path, just change the 2 variables below | |
$pythonPath = "C:\Python27\" | |
$pyuicPath = "C:\Python27\Lib\site-packages\PyQt4\uic\pyuic.py" | |
If (!(Test-Path "designer")) { | |
Write-Host "Please run this from the project root" | |
Exit |
This gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.
To use the script, follow the instructions given in the script's docstring.
For further details, read this blogpost.
The procedure outlined here is inspired by this answer on Stack Overflow.