Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| $username = "insert_username_here" | |
| $password = ConvertTo-SecureString "insert_password_here" -AsPlainText -Force | |
| $credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username,$password | |
| $session = New-PSSession "insert_hostname_here" -Credential $credential | |
| Invoke-Command -Session $session -ScriptBlock { | |
| Set-ExecutionPolicy RemoteSigned | |
| Import-Module WebAdministration | |
| New-Item iis:\Sites\%teamcity.build.branch%.insert_local_name_here -bindings @{protocol="http";bindingInformation=":80:%teamcity.build.branch%.insert_local_name_here"} -physicalPath c:\inetpub\wwwroot\%teamcity.build.branch%.insert_local_name_here | |
| Set-ItemProperty 'IIS:\Sites\%teamcity.build.branch%.insert_local_name_here' ApplicationPool "ASP.NET v4.0" |
| namespace Log | |
| { | |
| /// <summary> | |
| /// Helps you trace the execution of your code. | |
| /// </summary> | |
| /// <remarks> | |
| /// Same as System.Diagnostics.Trace but adds the class and method names to the trace message.<br/> | |
| /// <br/> | |
| /// More documentation about Trace and Debug:<br/> | |
| /// <list type="bullet"> |
| $ProcessesById = @{} | |
| foreach ($Process in (Get-WMIObject -Class Win32_Process)) { | |
| $ProcessesById[$Process.ProcessId] = $Process | |
| } | |
| $ProcessesWithoutParents = @() | |
| $ProcessesByParent = @{} | |
| foreach ($Pair in $ProcessesById.GetEnumerator()) { | |
| $Process = $Pair.Value |
| public class MyHub : Hub | |
| { | |
| // The hub method must be Task returning and accept an IProgress<T> | |
| public async Task DoLongRunningThing(IProgress<int> progress) | |
| { | |
| for (var i = 0; i <= 100; i+=5) | |
| { | |
| await Task.Delay(200); | |
| progress.Report(i); | |
| } |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| (function() { | |
| var CSSCriticalPath = function(w, d, opts) { | |
| var opt = opts || {}; | |
| var css = {}; | |
| var pushCSS = function(r) { | |
| if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
| var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
| for(var i = 0; i < styles.length; i++) { | |
| if(!!styles[i] === false) continue; | |
| var pair = styles[i].split(": "); |
W3C Introduction to Web Components - explainer/overview of the technologies
URL: http://teamcity:8111/httpAuth/app/rest/projects/
Method: POST
Accept: application/xml
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Runtime.CompilerServices; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| using System.Threading; | |
| using System.Threading.Tasks; |
| #!/usr/bin/python | |
| import Image | |
| import base64, zlib | |
| # Jay Parlar convinced me to turn this data structure | |
| # from a dictionary into an object. | |
| class PackedImage(object): | |
| def __init__(self, mode, size, data): | |
| self.mode = mode |