Only 3 fundamental properties of an actor:
- Send messages
Only 3 fundamental properties of an actor:
| using SlackAPI; | |
| var client = new SlackSocketClient("[SLACK_TOKEN]"); | |
| client.Connect((connected) =>{}, () =>{ | |
| Console.WriteLine("Connected"); | |
| client.PostMessage( | |
| resp => { | |
| Console.WriteLine("Posted"); | |
| }, | |
| "[CHANNEL]", |
| # 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 |
| -- 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 |
| Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar -EnableOpenFileExplorerToQuickAccess -EnableShowRecentFilesInQuickAccess -EnableShowFrequentFoldersInQuickAccess -EnableExpandToOpenFolder | |
| Enable-RemoteDesktop | |
| Update-ExecutionPolicy Unrestricted -Force | |
| Disable-InternetExplorerESC | |
| Disable-BingSearch | |
| cinst chocolatey | |
| cinst Boxstarter |
| 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())"; |