Skip to content

Instantly share code, notes, and snippets.

@madbonez
madbonez / ws
Last active December 4, 2023 12:04
ws
‎‎​
@madbonez
madbonez / run.ts
Last active June 26, 2023 19:10
external-folder-dependensies
import { Node, Project, SourceFile, SyntaxKind, ImportDeclaration, ImportSpecifier } from 'ts-morph';
import * as path from 'path';
const SRC_ROOT_DIR = process.argv[2];;
const project = new Project({
tsConfigFilePath: path.resolve(SRC_ROOT_DIR, 'src', 'tsconfig.app.json'),
skipLoadingLibFiles: true,
skipFileDependencyResolution: true,
@madbonez
madbonez / index.js
Last active November 5, 2021 11:25
NPX-hello
#!/usr/bin/env node
console.log('Hi There!')
@madbonez
madbonez / server.js
Created June 8, 2021 07:06
fastify settings for SPA serve
const fastify = require('fastify')()
const path = require('path')
fastify.register(require('fastify-static'), {
root: path.join(__dirname, 'dist'),
})
fastify.setNotFoundHandler(function (request, reply) {
reply.sendFile('index.html')
})
@madbonez
madbonez / JavaBehindProxy.java
Created January 26, 2016 14:33
Java Proxy system set property and Use Authenticator if it needed/ Then test http connection
package ru.bis.integration.regognition;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Authenticator;
import java.net.HttpURLConnection;
import java.net.PasswordAuthentication;
import java.net.URL;