Skip to content

Instantly share code, notes, and snippets.

() => {}

Isham Mohamed IshamMohamed

() => {}
View GitHub Profile
View cisworker.service
Description=Long running service/daemon created from .NET worker template
# will set the Current Working Directory (CWD). Worker service will have issues without this setting
# systemd will run this executable to start the service
# to query logs using journalctl, set a logical name here
IshamMohamed / quickdenoserver.ts
Last active May 27, 2020 05:42
View quickdenoserver.ts
import { serve } from "";
const s = serve({ port: 80 });
for await (const req of s) {
req.respond({ body: "Hello World\n" });
View JPBerthWharfMulti
"id": 1,
"vesselName": "AAL Bangkok",
"voyageInOut": "A14",
"berthNumber": "J15/16",
"estimateTimeOfBerting": "07102019 0600",
"estimateTimeOfUnberting": "08102019 1800",
"vesselLoa": "181.12",
"vesselDwt": "10.21",
IshamMohamed /
Created October 31, 2019 05:38
cURL command to assign a Blueprint to Azure Management Group
# Below is the cURL command to create or update a Blueprint in Azure
# According to documentation,
# 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 '' -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
IshamMohamed / VSCode_ContextMenu.reg
Created March 28, 2019 07:37
The reg script to make context menu item to open a folder in VS Code
View VSCode_ContextMenu.reg
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\Users\\User\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Users\\User\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
from termcolor import colored
import subprocess as sp
import time
import sys
def delay_print(s):
for c in s:
View stopled.vbs
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
View led.vbs
Set wshShell =wscript.CreateObject("WScript.Shell")
wscript.sleep 200
wshshell.sendkeys "{NUMLOCK}"
wscript.sleep 200
wshshell.sendkeys "{CAPSLOCK}"
wscript.sleep 200
wshshell.sendkeys "{SCROLLLOCK}"
View Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
namespace ListListTest
class Program
static void Main(string[] args)
View TeslaSemiData
"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",