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
[Unit] | |
Description=Long running service/daemon created from .NET worker template | |
[Service] | |
Type=notify | |
# will set the Current Working Directory (CWD). Worker service will have issues without this setting | |
WorkingDirectory=/srv/cisworker | |
# systemd will run this executable to start the service | |
ExecStart=/srv/cisworker/cis.worker.demo | |
# to query logs using journalctl, set a logical name here |
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
import { serve } from "https://deno.land/std/http/server.ts"; | |
const s = serve({ port: 80 }); | |
console.log("http://localhost:80/"); | |
for await (const req of s) { | |
req.respond({ body: "Hello World\n" }); | |
} |
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
[ | |
{ | |
"id": 1, | |
"vesselName": "AAL Bangkok", | |
"voyageInOut": "A14", | |
"berthNumber": "J15/16", | |
"estimateTimeOfBerting": "07102019 0600", | |
"estimateTimeOfUnberting": "08102019 1800", | |
"vesselLoa": "181.12", | |
"vesselDwt": "10.21", |
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
#!/bin/bash | |
# Below is the cURL command to create or update a Blueprint in Azure | |
# According to documentation https://docs.microsoft.com/en-us/rest/api/blueprints/assignments/createorupdate, | |
# the particulat REST endpoint can accept either a subscription or a management group as the scope. | |
# The below was written to accept a management group | |
curl 'https://management.azure.com//providers/Microsoft.Management/managementGroups/Kloudynet/providers/Microsoft.Blueprint/blueprintAssignments/assignForMgmtGrp?api-version=2018-11-01-preview' -X PUT -H 'Authorization: Bearer [TOKEN]' -H 'DNT: 1' -H 'Content-Type: application/json' --data-binary $'{\n\u0009identity: {"type" : "SystemAssigned"},\n\u0009location: "southeastasia",\n\u0009properties:{"blueprintId":"providers/Microsoft.Management/managementGroups/Kloudynet/providers/Microsoft.Blueprint/blueprints/BP1", "parameters":{}, "resourceGroups":{}}\n}' --compressed | |
# But this throws a 404 HTTP response | |
# Error message - The requested resource was not found, is not |
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
from termcolor import colored | |
import subprocess as sp | |
import time | |
import sys | |
def delay_print(s): | |
for c in s: | |
sys.stdout.write(c) | |
sys.stdout.flush() | |
time.sleep(0.05) |
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
Option Explicit | |
Dim WshShell | |
Set WshShell = WScript.CreateObject("WScript.Shell") | |
WshShell.Run "taskkill /f /im Cscript.exe", , True | |
WshShell.Run "taskkill /f /im wscript.exe", , True |
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
Set wshShell =wscript.CreateObject("WScript.Shell") | |
do | |
wscript.sleep 200 | |
wshshell.sendkeys "{NUMLOCK}" | |
wscript.sleep 200 | |
wshshell.sendkeys "{CAPSLOCK}" | |
wscript.sleep 200 | |
wshshell.sendkeys "{SCROLLLOCK}" | |
loop |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ListListTest | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
"markets" : ["US","CA","AT","AU","BE","CH","CN","DE","DK","FI","FR","GB","HK","MO","EU","IT","JP","MX","NL","NO","SE","LI", "AE","BR","IN","NZ","SG","KR","ZA","TW"], | |
"otherEU" : ["BG","CY","CZ","EE","GR","HR","HU","IS","LV","LT","LU","MT","PL","PT","RO","RU","SK","SI","ES","TR", "IE"], | |
"properties" : { | |
"AU" : { | |
"locale" : "en_AU", | |
"slug" : "en_AU", | |
"region" : "apac", | |
"language" : "en", | |
"paymentType" : "STRIPE", | |
"formattedDeposit" : "$1,500", |
NewerOlder