Skip to content

Instantly share code, notes, and snippets.

View Jalalhejazi's full-sized avatar
💭
Automation | Teaching | Inspiring | Sharing

Jalal Hejazi Jalalhejazi

💭
Automation | Teaching | Inspiring | Sharing
  • Demant Enterprise
  • Denmark
View GitHub Profile
# PowerShell code to run in PowerShell 7 console
$url="https://superusers-kursus-2020.westeurope-1.eventgrid.azure.net/api/events"
$secret="RDvN3YqgGBqjYPuj7MuwhWYuRIvnds+UV0yMI15pRVw="
[Environment]::SetEnvironmentVariable("event-grid-url", $url , 'User')
[Environment]::SetEnvironmentVariable("event-grid-key", $secret, 'User')
@Jalalhejazi
Jalalhejazi / app.ts
Created May 15, 2017 10:52
app.ts typescript +express
import { json, urlencoded } from "body-parser";
import * as compression from "compression";
import * as express from "express";
import * as path from "path";
import { publicRouter } from "./routes/public";
import { landingPage} from "./routes/index";
import { aboutRouter } from "./routes/about" ;
const app: express.Application = express();
@Jalalhejazi
Jalalhejazi / .editorconfig
Created May 15, 2017 10:52
.editorconfig
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
@Jalalhejazi
Jalalhejazi / .gitignore
Last active May 21, 2017 07:21
.gitignore
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/build
# dependencies
/node_modules
/bower_components
@Jalalhejazi
Jalalhejazi / tslint.json
Created May 15, 2017 10:51
tslint.json
{
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
"callable-types": true,
"class-name": true,
"comment-format": [
true,
"check-space"
@Jalalhejazi
Jalalhejazi / tsconfig.json
Last active May 15, 2017 11:01
tsconfig.json TypeScripts
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
@Jalalhejazi
Jalalhejazi / nodemon.json
Created May 15, 2017 10:50
nodemon.json ignore exec watch
{
"verbose": false,
"ignore": [
".git",
"node_modules/**/node_modules"
],
"execMap": {
"js": "node"
},
"watch": [
@Jalalhejazi
Jalalhejazi / package.json
Created May 15, 2017 10:49
package.json nodejs +Express +TypeScripts
{
"name": "angular2-express-starter",
"version": "1.0.0",
"description": "Starter application of Angular2 with Express",
"main": "server/app.js",
"license": "MIT",
"scripts": {
"start": " tsc -p ./server && concurrently \"tsc -w -p ./server\" \"nodemon dist/server/bin/www.js\" "
},
@Jalalhejazi
Jalalhejazi / windowsUpdate.ps1
Created December 16, 2016 06:58
PS: WindowsUpdate
Clear-Host
Write-Host "0 -> Change setting in Windows Update app (default)"
Write-Host "1 -> Never check for updates (not recommended)"
Write-Host "2 -> Notify for download and notify for install"
Write-Host "3 -> Auto download and notify for install"
Write-Host "4 -> Auto download and schedule the install"
Write-Host "Enter any character to exit"
Write-Host
worker_processes 4;
events {
worker_connections 1024;
}
http {
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '