Skip to content

Instantly share code, notes, and snippets.

@chadmando
chadmando / powershell-web-server.ps1
Created February 28, 2022 22:30 — forked from 19WAS85/powershell-web-server.ps1
A simple web server built with powershell.
# This is a super **SIMPLE** example of how to create a very basic powershell webserver
# 2019-05-18 UPDATE — Created by me and and evalued by @jakobii and the comunity.
# Http Server
$http = [System.Net.HttpListener]::new()
# Hostname and port to listen on
$http.Prefixes.Add("http://localhost:8080/")
# Start the Http Server
@chadmando
chadmando / brew-install-script.sh
Last active September 17, 2021 17:33 — forked from CliffordAnderson/brew-install-script.sh
Brew script for installing packages and applications on OSX
#!/bin/sh
# Homebrew Script for OSX
# To execute: save and `chmod +x ./brew-install-script.sh` then `./brew-install-script.sh`
echo "Installing brew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing brew cask..."
brew tap homebrew/cask
@chadmando
chadmando / ohmyposhv3-v2.json
Created September 2, 2021 14:17 — forked from shanselman/ohmyposhv3-v2.json
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@chadmando
chadmando / ConnectingToAzureSQLFromPython
Created April 20, 2021 22:04 — forked from timmyreilly/ConnectingToAzureSQLFromPython
Using Flask_SQLAlchemy to connect to Azure SQL
#!/usr/bin/env python
import os
import urllib.parse
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
# Configure Database URI:
params = urllib.parse.quote_plus("DRIVER={SQL Server};SERVER=sqlhost.database.windows.net;DATABASE=pythonSQL;UID=username@sqldb;PWD=password56789")
@chadmando
chadmando / submit-to-urlscan.ps1
Last active January 13, 2020 21:20
PowerShell snippet for submitting to urlscan.io - By Nicholas Gipson -- Modified
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$uri = "https://urlscan.io/api/v1/scan/"
$apikey = #insert secure method to retreive api key
$url = #insert suspect url here
$header = @{
"API-Key" = $apikey
}
$body = @{
"url"=$url
@chadmando
chadmando / README.md
Created May 6, 2017 14:01 — forked from ovarunendra/README.md
rest-api using node.js and sqlite3