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 | |
apt-get update #resync package index | |
apt-get upgrade #newest versions of all packages, update must be run first | |
apt-get autoremove #removes depenancies no longer needed | |
# Removes .deb files that are no logner used | |
apt-get autoclean # only removes files that cannot be downloaded anymore (obsolete) | |
apt-get dist-upgrade #updates dependancies |
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 | |
docker history --no-trunc "$1" | \ | |
sed -n -e 's,.*/bin/sh -c #(nop) \(MAINTAINER .*[^ ]\) *0 B,\1,p' | \ | |
head -1 | |
docker inspect --format='{{range $e := .Config.Env}} | |
ENV {{$e}} | |
{{end}}{{range $e,$v := .Config.ExposedPorts}} | |
EXPOSE {{$e}} | |
{{end}}{{range $e,$v := .Config.Volumes}} | |
VOLUME {{$e}} |
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
function debug_containers() | |
{ | |
var parse_container = function (container, option){ | |
var result = []; | |
try { | |
result = container.container('getData', option); | |
if (!result.join) { result = []; } | |
} catch (e) { console.warn('There is no info for ' + option); } | |
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
Diff Viewer: | |
"C:\Program Files (x86)\Beyond Compare 4\BComp.exe" %base %mine /title1=%bname /title2=%yname /leftreadonly | |
Merge Tool: | |
"C:\Program Files (x86)\Beyond Compare 4\BComp.exe" %mine %theirs %base %merged /title1=%yname /title2=%tname /title3=%bname /title4=%mname |
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
$routes = @{ | |
"/about" = { return '<html><body>Quick and dirty HTTP Server</body></html>' }; | |
"/status" = { return '<html><body>Server is up and running!</body></html>' }; | |
"/home" = { return Get-Content -Path "index.html" | Out-String }; | |
# Add new paths here | |
} | |
$url = 'http://localhost:8080/' | |
$listener = New-Object System.Net.HttpListener | |
$listener.Prefixes.Add($url) |
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
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh |
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
function end-profiling { | |
VsPerfCmd.exe /GlobalOff | |
VsPerfCmd /Shutdown | |
VsPerfClrEnv /off | |
write-host "Profilers detached." | |
} |
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
function begin-profiling ( [string] $session, [string] $report_path ) { | |
if (-not (test-path $report_path )) { | |
mkdir "$report_path"| out-null | |
} | |
$env:_NT_SYMBOL_PATH = "srv*C:\mssymbols*http://msdl.microsoft.com/downloads/symbols" | |
$profilerPath = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Performance Tools" | |
if (-not ($env:Path.Contains($profilerPath))) { | |
$env:Path += (";" + $profilerPath); |
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
function get-assemblies([string] $path, [regex] $expr) { | |
# if you havin' regex problems I feel bad for you son | |
# I got \d+ problems and matching text ain't one. | |
dir $path | where { $expr.IsMatch($_.Name) } | select Name | |
} | |
function instrument-binaries ([string] $basePath, $assemblies) { | |
$profilerPath = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Performance Tools" | |
if (-not ($env:Path.Contains($profilerPath))) { |
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
4FBC721E39170F9CC37E75DCFDB870C5FD5448A51A463F6209AF029EE687D718B881A9D48BD8 |