Skip to content

Instantly share code, notes, and snippets.

View kekru's full-sized avatar

Kevin Krummenauer kekru

View GitHub Profile
@Tiberriver256
Tiberriver256 / PowerShellNTFSStaticFileServer.ps1
Last active January 5, 2024 08:23
This script starts a small web server listening on localhost:8080 that will impersonate the authenticated user and serve static content. This means if they do not have NTFS permissions to the file they will get an access denied or a 404 file not found if they do not have NTFS access to list contents of the directory.
function Get-DirectoryContent {
<#
.SYNOPSIS
Function to get directory content
.EXAMPLE
Get-DirectoryContent -Path "C:\" -HeaderName "poshserver.net" -RequestURL "http://poshserver.net" -SubfolderName "/"
@iffy
iffy / .gitignore
Last active April 17, 2024 07:19
Example using electron-updater with `generic` provider.
node_modules
dist/
yarn.lock
wwwroot
@bendisposto
bendisposto / core.clj
Created March 16, 2017 09:21
REPL Session - Generative Testing, Softwerkskammer Ruhr, 15.3.2017
(ns bsp.core
(:require [clojure.repl :refer :all]
[clojure.spec :as spec]
[clojure.test.check :refer [quick-check]]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :refer [for-all]]
[clojure.test :refer [is are run-tests deftest]]))
(defn ultrasort [coll] (seq (into (sorted-set) coll)))
@razbomi
razbomi / gulpfile.js
Created November 16, 2016 23:19
Gulp pipe function
'use strict';
var gulp = require('gulp');
var through = require('through2');
// https://gulp.readme.io/docs
gulp.task('default', () => {
gulp.src('src/**/*')
.pipe(pipeFunction())
.pipe(gulp.dest('dist'))
@noahcoad
noahcoad / yaml2json.py
Last active December 27, 2019 22:46
Python to Convert yaml to json
# convert yaml to json
# pip3 install pyyaml
# http://pyyaml.org/wiki/PyYAMLDocumentation
# py3 yaml2json.py < ~/code/manpow/homeland/heartland/puphpet/config.yaml
# gist https://gist.github.com/noahcoad/51934724e0896184a2340217b383af73
import yaml, json, sys
sys.stdout.write(json.dumps(yaml.load(sys.stdin), sort_keys=True, indent=2))
@ericclemmons
ericclemmons / example.md
Last active April 24, 2024 18:09
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@solidnerd
solidnerd / GitlabContainerRegistrySetup.md
Last active February 21, 2024 14:48
GitLab Container Registry Setup

Settting up a Container Registry with docker-gitlab

This should be used for new users to getting started with the container registry feature on docker-gitlab.

Requirements

@yuki-takei
yuki-takei / keybindings.json
Last active August 22, 2021 06:23 — forked from bpedman/keybindings.json
Visual Studio Code - Eclipse Keybindings (Win, Linux)
[
{
"key": "ctrl+d",
"command": "editor.action.cutLines",
"when": "editorTextFocus"
},
{
"key": "ctrl+o",
"command": "workbench.action.gotoSymbol"
},
@jitpack-io
jitpack-io / init.gradle
Created December 7, 2015 13:29
JitPack repository in Gradle
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.dsl.RepositoryHandler
apply plugin:JitPackRepositoryPlugin
class JitPackRepositoryPlugin implements Plugin<Gradle> {
void apply(Gradle gradle) {
@julz
julz / main.go
Created November 20, 2015 12:39
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {