$ cd /path/to/Dockerfile
$ sudo docker build .
View running processes
| #!/bin/bash | |
| mkdir postgres | |
| cd postgres | |
| docker volume create --driver local --name=pgvolume | |
| docker volume create --driver local --name=pga4volume | |
| docker network create --driver bridge pgnetwork |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| image: docker:latest | |
| before_script: | |
| - apt-get update -y # Updating the Ubuntu Docker instance. | |
| - python -V # Print out python version for debugging. | |
| - apt install -y zip jq | |
| - pip install awscli --upgrade --user | |
| - export PATH=~/.local/bin:$PATH # Required for awscli. | |
| - aws --version # Print out aws cli version for debugging. |
| // JS array equivalents to C# LINQ methods - by Dan B. | |
| // Here's a simple array of "person" objects | |
| var people = [ | |
| { name: "John", age: 20 }, | |
| { name: "Mary", age: 35 }, | |
| { name: "Arthur", age: 78 }, | |
| { name: "Mike", age: 27 }, | |
| { name: "Judy", age: 42 }, | |
| { name: "Tim", age: 8 } |
| # credit for getting me going in the right direction | |
| # http://blogs.lessthandot.com/index.php/uncategorized/access-git-commits-during-a-teamcity-build-using-powershell/ | |
| # these properties should be entered into your configuration parameters section | |
| $project = "%Octopus.Project%" | |
| $deployTo = "%Octopus.DefaultEnvironment%" | |
| $buildVersion = "%BuildVersion%" | |
| $octopusApiKey = "%Octopus.BuildDeployBot.APIKey%" | |
| $octopusServer = "%Octopus.Server.Url%" |
| package main; | |
| import ( | |
| "flag" | |
| "fmt" | |
| "os" | |
| "path/filepath" | |
| "github.com/aws/aws-sdk-go/aws" | |
| "github.com/aws/aws-sdk-go/service/s3" |
| <?xml version="1.0"?> | |
| <package > | |
| <metadata> | |
| <id>MyProject</id> | |
| <version>1.0.0</version> | |
| <title>My Project</title> | |
| <authors>bryan.wilhite@gmail.com</authors> | |
| <owners>bryan.wilhite@gmail.com</owners> | |
| <projectUrl>http://git-stash.myco.com/projects/CV/repos/myproject/browse</projectUrl> | |
| <iconUrl>http://git-stash.myco.com/projects/CV/avatar.png?s=256</iconUrl> |
| --from SO: http://stackoverflow.com/questions/5873170/generate-class-from-database-table | |
| declare @TableName sysname = 'TableName' | |
| declare @Result varchar(max) = 'public class ' + @TableName + ' | |
| {' | |
| select @Result = @Result + ' | |
| public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; } | |
| ' | |
| from |