This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | |
| -- PostgreSQL database dump | |
| -- | |
| SET statement_timeout = 0; | |
| SET lock_timeout = 0; | |
| SET client_encoding = 'UTF8'; | |
| SET standard_conforming_strings = on; | |
| SET check_function_bodies = false; | |
| SET client_min_messages = warning; | |
| -- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Git branch auto-clone script | |
| # https://gist.github.com/kenaniah/7af6efe09df138a8a2b9 | |
| # BASE should point to a bare git repo | |
| # DEST should point to a directory for branches to be checked out into | |
| # Define where things are pulled from | |
| BASE=$1 | |
| DEST=$2 | |
| # Fetch to the source repo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Total number of days | |
| var days = process.argv[2] || 90 | |
| //List of books | |
| var books = { | |
| Genesis: 50, | |
| Exodus: 40, | |
| Leviticus: 27, | |
| Numbers: 36, | |
| Deuteronomy: 34, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Manages Shadow Groups in Active Directory | |
| .DESCRIPTION | |
| This script automatically manages the member users of groups placed in | |
| "OU=Shadow Groups,DC=contoso,DC=com". Users and computers that are contained | |
| by OUs that match the name of a shadow group are automatically added to that group, | |
| and users that are no longer contained by a matching OU are removed from | |
| the group. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $GROUPS = Get-ADGroup -Filter * -Properties proxyAddresses,mail,displayName | |
| $GROUPS | ForEach { | |
| $GROUP = $_ | |
| $GROUP.proxyAddresses = $null | |
| if($GROUP.mail){ | |
| $MAIL = $GROUP.mail.ToString() | |
| $NAME = $GROUP.name.ToString() | |
| $GROUP.proxyAddresses = "SMTP:$MAIL" | |
| $GROUP.displayName = $NAME | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Connect to Microsoft Online as admin | |
| $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "[email protected]",(Get-Content admin.pass | ConvertTo-SecureString) | |
| Connect-MsolService -Credential $cred | |
| # Connect to Office365 as admin | |
| $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred -Authentication Basic -AllowRedirection | |
| Set-ExecutionPolicy unrestricted | |
| Import-PSSession $session |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This file is being maintained by Puppet. | |
| # DO NOT EDIT | |
| # Usage information | |
| if [ $# -ne 2 ] | |
| then | |
| echo "Usage: $0 <original_name> <new_name>" | |
| echo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| processors=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l) | |
| # Usage information | |
| if [ $# -ne 2 ] | |
| then | |
| echo "Usage: $0 <source_file> <dbname>" | |
| echo | |
| echo "This script will restore the requested database from the given source file." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo 'alias ll="ls -l"' >> /etc/profile | |
| echo 'alias morningbrew="brew update && brew upgrade --all && brew cleanup && brew prune && gem update"' >> /etc/profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Test Page</title> | |
| </head> | |
| <style> | |
| HTML, BODY, MAIN { | |
| width: 100%; | |
| height: 100%; |