Only 3 fundamental properties of an actor:
- Send messages
Add-Type -AssemblyName System.IO.Compression.FileSystem | |
$TEMP = $([environment]::GetEnvironmentVariable("TEMP", "User")) | |
$CWD = $(Split-Path $MyInvocation.MyCommand.Path) | |
$PATH = $([environment]::GetEnvironmentVariable("PATH", "User")) | |
$git_folder = "C:\Program Files\Git" | |
$git_bin_folder = "$($git_folder)\bin" | |
$tmp_folder = "$($TEMP)\$([guid]::NewGuid())"; |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar -EnableOpenFileExplorerToQuickAccess -EnableShowRecentFilesInQuickAccess -EnableShowFrequentFoldersInQuickAccess -EnableExpandToOpenFolder | |
Enable-RemoteDesktop | |
Update-ExecutionPolicy Unrestricted -Force | |
Disable-InternetExplorerESC | |
Disable-BingSearch | |
cinst chocolatey | |
cinst Boxstarter |
-- See https://gist.github.com/bertwagner/356bf47732b9e35d2156daa943e049e9 for a formatted version of this JSON | |
DECLARE @garage nvarchar(1000) = N'{ "Cars": [{ "Make": "Volkswagen", "Model": { "Base": "Golf", "Trim": "GL" }, "Year": 2003, "PurchaseDate": "2006-10-05T00:00:00.000Z" }, { "Make": "Subaru", "Model": { "Base": "Impreza", "Trim": "Premium" }, "Year": 2016, "PurchaseDate": "2015-08-18T00:00:00.000Z" }] }' | |
SELECT JSON_VALUE(@garage, '$.Cars[0].Make') -- Return the make of the first car in our array | |
-- Output: Volkswagen | |
SELECT CAST(JSON_VALUE(@garage, '$.Cars[0].PurchaseDate') as datetime2) -- Return the Purchase Date of the first car in our array and convert it into a DateTime2 datatype | |
-- Output: 2006-10-05 00:00:00.0000000 | |
SELECT JSON_VALUE(@garage, '$.Cars') -- This returns NULL because the values of Cars is an array instead of a simple object |
# Stop all containers | |
docker stop `docker ps -qa` | |
# Remove all containers | |
docker rm `docker ps -qa` | |
# Remove all images | |
docker rmi -f `docker images -qa ` | |
# Remove all volumes |
using SlackAPI; | |
var client = new SlackSocketClient("[SLACK_TOKEN]"); | |
client.Connect((connected) =>{}, () =>{ | |
Console.WriteLine("Connected"); | |
client.PostMessage( | |
resp => { | |
Console.WriteLine("Posted"); | |
}, | |
"[CHANNEL]", |
Only 3 fundamental properties of an actor:
Split-Path -parent $dte.Solution.FileName | cd | |
New-Item -ItemType Directory -Force -Path ".\licenses" | |
@( Get-Project -All | ? { $_.ProjectName } | % { Get-Package -ProjectName $_.ProjectName } ) | Sort -Unique Id | % { $pkg = $_ ; Try { (New-Object System.Net.WebClient).DownloadFile($pkg.LicenseUrl, (Join-Path (pwd) 'licenses\') + $pkg.Id + ".html") } Catch [system.exception] { Write-Host "Could not download license for $($pkg.Id)" } } |
I'm using this Vagrantfile
to run Kafka on a Windows 8.1 laptop for development purposes.
It runs the ultra-lightweight boot2docker Linux, then uses Vagrant's Docker provisioning support to spin up ZooKeeper and Kafka.
The fun bits to work out were:
-p
flag), so you can access the instance from Windows using localhost:9092
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
using System.Globalization; | |
using Irony.Parsing; | |
namespace Grammar | |
{ | |
[Language("LuceneGrammar", "1.0", "Lucene Grammar")] | |
public class LuceneGrammar : Irony.Parsing.Grammar | |
{ | |
public LuceneGrammar() | |
: base(true) // true means case sensitive |