Skip to content

Instantly share code, notes, and snippets.

View majkinetor's full-sized avatar
🎧

Miodrag Milić majkinetor

🎧
View GitHub Profile
@zbalkan
zbalkan / Start-WindowsActivation.ps1
Last active December 16, 2023 17:22
It's a drop-in replacement for slmgr.vbs script
#Requires -RunAsAdministrator
#Requires -Version 5
<#
.Synopsis
Activates Windows via KMS
.DESCRIPTION
It's a drop in replacement for slmgr scripts
.EXAMPLE
Start-WindowsActivation -Verbose # Activates the local computer
.EXAMPLE
@calebmer
calebmer / postgrest-auth.md
Last active November 2, 2023 17:53
PostgREST Auth Protocol

This document is a work in progress. Any comments would be extremely helpful and appreciated!

PostgREST Auth Protocol

This document will describe an authentication framework very loosely based on the OAuth2 specification for a seperate authentication server to be used with the main PostgREST resource server. As PostgREST is going in a layered direction, this authentication layer must be interchangeable with other authentication implementations.

Options

  • The first parameter (same as PostgREST) must be a PostgreSQL database connection string.
  • -p, --port [number]: The port on which the server will listen for HTTP requests. Defaults to 3001.
  • -u, --user-relation [relation]: The relation (table or view) which PostgREST Auth will use for generating JWTs. If the relation is a view, it is recommend that it be auto-updateable. Must be user defined. The default is postgrest.users.
  • -r, --refresh-relation [relation]: The relation where PostgREST Auth will st
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'