This file contains 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
package main | |
import ( | |
"fmt" | |
) | |
// These interface define how core components can be visited by plugins | |
type AcceptNetworkPlugin interface { | |
Accept(plugin NetworkPlugin) |
This file contains 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
version: '3' | |
services: | |
node: | |
container_name: node | |
image: node:9.8.0-alpine | |
#build: truffle | |
volumes: | |
- ./dapp:/dapp |
This file contains 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
{ | |
"name": "Relay-DNS", | |
"type": "Microsoft.Resources/deployments", | |
"apiVersion": "[variables('apiVersionLinkDefault')]", | |
"dependsOn": [ | |
"vmLoopNode" | |
], | |
"properties": { | |
"mode": "Incremental", | |
"templateLink": { |
This file contains 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
# Initialize reboot log file | |
$reboot_log = "C:\installation.rbt" | |
if ( -not (Test-Path $reboot_log) ) { New-Item $reboot_log -type file } | |
$reboots = Get-Content $reboot_log | |
# Boxstarter options | |
$Boxstarter.RebootOk=$true # Allow reboots? | |
$Boxstarter.NoPassword=$false # Is this a machine with no login password? | |
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot |
This file contains 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 buildList(ulId, posts) { | |
var lis = posts.map(t => { | |
var li = document.createElement("li"); | |
var link = document.createElement("a"); | |
link.href = t.url; | |
link.appendChild(document.createTextNode(t.title)); | |
li.appendChild(link); | |
return li; | |
}); |
This file contains 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
foreach (var @event in events) | |
{ | |
try | |
{ | |
ApplyDynamic(@event); | |
} | |
catch (RuntimeBinderException runtimeBinder) | |
{ | |
//if someone finds the way to extract the type out of that | |
throw new NotSupportedException($"The event type {@event.GetType().Name} is not supported by the model", runtimeBinder); |
This file contains 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
#WORKS | |
Function ListZip { | |
param( | |
[string]$zipfile | |
) | |
Add-Type -AssemblyName System.IO.Compression.FileSystem | |
$ziparchive = [System.IO.Compression.ZipFile]::OpenRead($zipfile) | |
$ziparchive.Entries | % { Write-Host $_.Name } | |
} |
This file contains 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
Script MsmqStoragePath | |
{ | |
DependsOn = '[File]MSMQDirectories' | |
GetScript = { | |
$manager = Get-MsmqQueueManager | |
return @{ | |
Result = $manager | |
GetScript = $GetScript | |
TestScript = $TestScript | |
SetScript = $SetScript |
This file contains 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
# Use git and git+ssh instead of https | |
[url "git://github.com/"] | |
insteadOf = https://github.com/ | |
[url "[email protected]:"] | |
pushInsteadOf = "git://github.com/" | |
[url "[email protected]:"] | |
pushInsteadOf = "https://github.com/" |
This file contains 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
public static MvcHtmlString CompassUrl(this HtmlHelper helper, string compassUrl) | |
{ | |
//... | |
var anchorBuilder = new TagBuilder("a"); | |
anchorBuilder.Attributes.Add("target", IsCompassContext(helper) ? "_parent" : "_blank"); | |
anchorBuilder.Attributes.Add("href", compassUrl); | |
//... | |
} | |
private static bool IsCompassContext(HtmlHelper helper) |
NewerOlder