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
| # Povides a function that allows files to be uploaded to an Amazon S3 bucket | |
| function upload_to_s3 { | |
| # Definitions | |
| bucket=<bucket name> | |
| resource=$2/`basename $1` | |
| content_type="application/x-compressed" | |
| date=`date -R` | |
| md5=`openssl dgst -md5 -binary "$1" | openssl enc -e -base64` |
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
| $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 "admin@contoso.onmicrosoft.com",(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
| CREATE OR REPLACE FUNCTION public.hstore2json ( | |
| hs public.hstore | |
| ) | |
| RETURNS text AS | |
| $body$ | |
| DECLARE | |
| rv text; | |
| r record; | |
| BEGIN | |
| rv:=''; |
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 | |
| # Lock file script written to ensure only once process at a time holds a lock | |
| # Automatically kills zombie processes past the threshold | |
| # https://gist.github.com/1350609 | |
| if [ $# -ne 3 ]; then | |
| echo "Usage: `basename $0` <lockfile> <timeout> <command>"; | |
| exit 2; | |
| fi |
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
| <?php | |
| /** | |
| * Simple, scoped template rendering engine | |
| * | |
| * Variables may be passed to templates by setting dynamic | |
| * properties of this class or by passing them at call time. | |
| * | |
| * @author Kenaniah Cerny <kenaniah@gmail.com> https://github.com/kenaniah/insight | |
| * @license http://creativecommons.org/licenses/by-sa/3.0/ | |
| * @copyright Copyright (c) 2009, Kenaniah Cerny |
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
| <?php | |
| /** | |
| * Database abstraction and query result classes (requires PHP 5.3) | |
| * | |
| * This class is built primarily for PostgreSQL 8.4+ | |
| * Compatibility with other database types is not guaranteed | |
| * | |
| * @author Kenaniah Cerny <kenaniah@gmail.com> | |
| * @version 1.2.0 | |
| * @license http://creativecommons.org/licenses/by-sa/3.0/ |
OlderNewer