Skip to content

Instantly share code, notes, and snippets.

View lazywinadmin's full-sized avatar

François-Xavier Cat lazywinadmin

View GitHub Profile
@lazywinadmin
lazywinadmin / list_perms.sql
Created June 15, 2023 18:40 — forked from onpaws/list_perms.sql
list permissions SQL Server
/* via http://stackoverflow.com/questions/7048839/sql-server-query-to-find-all-permissions-access-for-all-users-in-a-database
Security Audit Report
1) List all access provisioned to a sql user or windows user/group directly
2) List all access provisioned to a sql user or windows user/group through a database or application role
3) List all access provisioned to the public role
Columns Returned:
UserName : SQL or Windows/Active Directory user cccount. This could also be an Active Directory group.
UserType : Value will be either 'SQL User' or 'Windows User'. This reflects the type of user defined for the
SQL Server user account.
@lazywinadmin
lazywinadmin / WinPENanoDomainJoin.ps1
Created January 9, 2019 20:57 — forked from dotps1/WinPENanoDomainJoin.ps1
Nano domain join for use in SCCM task sequence!
$source = @'
using System;
using System.Security.Principal;
using System.Runtime.InteropServices;
namespace ECGCAT
{
public class Kernel32
{
[DllImport("Kernel32.dll", SetLastError = true)]
@lazywinadmin
lazywinadmin / WinPENanoDomainJoin.ps1
Created January 9, 2019 17:33 — forked from Ryan2065/WinPENanoDomainJoin.ps1
Nano domain join for use in SCCM task sequence!
$source = @'
using System;
using System.Security.Principal;
using System.Runtime.InteropServices;
namespace ECGCAT
{
public class Kernel32
{
[DllImport("Kernel32.dll", SetLastError = true)]
@lazywinadmin
lazywinadmin / Powershell_HTTP_Server.MD
Created August 4, 2018 01:29 — forked from jakobii/HTTPServer.ps1
A Basic Powershell Webserver

This is a super SIMPLE example of how to create a very basic powershell webserver

# Http Server
$http = [System.Net.HttpListener]::new() 

# Hostname and port to listen on
$http.Prefixes.Add("http://localhost:8080/")
@lazywinadmin
lazywinadmin / HOWTO.md
Created January 13, 2018 16:46 — forked from cvan/HOWTO.md
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default

Instructions

CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.

  1. Make sure you have registered a domain name.
  2. Sign up for CloudFlare and create an account for your domain.
  3. In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
  4. From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
  5. If you

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@lazywinadmin
lazywinadmin / blogspot_to_jekyll.rb
Created September 5, 2016 02:07 — forked from kennym/blogspot_to_jekyll.rb
Migrate your blogger blog posts to jekyll.
#!/usr/bin/env ruby
#
# Convert blogger (blogspot) posts to jekyll posts
#
# Basic Usage
# -----------
#
# ./blogger_to_jekyll.rb feed_url
#
# where `feed_url` can have the following format: