Often usefull for in-cluster debugging.
$ kubectl run --generator=run-pod/v1 --image=alpine:3.5 -it alpine-shell -- /bin/sh
detach (without killing the container):
| #CHECK THE PATH ON LINE 2 and the FEED on LINE 3 | |
| cd "C:\users\scott\Downloads" | |
| $a = ([xml](new-object net.webclient).downloadstring("https://channel9.msdn.com/Series/CSharp-101/feed/mp4")) | |
| $a.rss.channel.item | foreach{ | |
| $url = New-Object System.Uri($_.enclosure.url) | |
| $file = $url.Segments[-1] | |
| $file | |
| if (!(test-path $file)) { | |
| (New-Object System.Net.WebClient).DownloadFile($url, $file) | |
| } |
| <?xml version="1.0" encoding="utf-8"?> | |
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| <!-- @FearTheCowboy's Simple PowerShell Task for MSBuild --> | |
| <UsingTask TaskName="PowerShell" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll"> | |
| <ParameterGroup><ScriptBlock ParameterType="System.String" Required="true" /></ParameterGroup> | |
| <Task><Reference Include="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll"/><Code Type="Class" Language="cs"><![CDATA[ | |
| public class PowerShell : Microsoft.Build.Tasks.Exec { | |
| public string ScriptBlock {set { EchoOff=true; Command = string.Format( "@powershell \"Invoke-Command -ScriptBlock {{ $errorActionPreference='Stop'; {0} ; exit $LASTEXITCODE }} \"", value.Replace("\"","\"\"").Replace("\r\n",";").Replace("\n",";").Replace("\r",";")); } } | |
| }]]></Code></Task> | |
| </UsingTask> |
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
This is how you can take an OpenVPN .ovpn config file and extract the certificates/keys required to import the profile into NetworkManager.
| /* | |
| modified from original source: https://bitbucket.org/mattkotsenas/c-promises/overview | |
| */ | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace Promises |
| /** | |
| * @constructor | |
| */ | |
| function Profiler() { | |
| } | |
| /** | |
| * Uses the best resolution timer that is currently available. | |
| * The return value of this can only be used for measuring the time interval, |