Skip to content

Instantly share code, notes, and snippets.

@theit8514
theit8514 / serilog-configuration-schema.json
Last active November 13, 2018 21:29 — forked from turchenkoalex/serilog-configuration-schema.json
serilog-configuration-schema.json
{
"properties": {
"Serilog": {
"title": "JSON schema for Serilog.Settings.Configuration",
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"description": "Serilog configuration",
"definitions": {
"libraries": {
"type": "array",
@theit8514
theit8514 / docker-status
Created May 10, 2018 14:52
Docker status report script
#!/bin/bash
# This script will run a 'docker ps' comamnd, passing through any arguments, and then run a 'docker inspect' on
# each container to get the bound port information. Exposed but unbound ports are not shown (unlike 'docker ps').
# It also filters out the host '0.0.0.0' since this is the assumed default value for '-p'. It makes the output much cleaner.
# If the docker container is configured with --net that will also be displayed.
# Requires the 'column' command. On my Synology, I get that with `sudo opkg install column`.
#NAMES IMAGE STATUS PORTS
list_names=('NAMES' '-----')
@theit8514
theit8514 / user.js
Last active April 15, 2019 04:34
Plex Season Title Editor - UserScript
// ==UserScript==
// @name Plex Season Title Editor
// @namespace https://gist.github.com/theit8514
// @version 0.2
// @description Allows editing of Season titles by adding the Title input to the Season edit popup
// @author theit8514
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js
// @include https://app.plex.tv/desktop*
// @include https://*.plex.direct:*/*
>calibre-debug -r FanFicFare -- -c fanficfare_debug.ini --download-list=http://archiveofourown.org/works/511694 -d -m
FFF: DEBUG: 2017-10-18 11:37:25,400: calibre_plugins.fanficfare_plugin.fanficfare.configurable(1038): #####################################
pagecache(GET) MISS: http://archiveofourown.org/works/511694?view_adult=true
FFF: DEBUG: 2017-10-18 11:37:27,683: calibre_plugins.fanficfare_plugin.fanficfare.configurable(1038): #####################################
pagecache(GET) MISS: https://archiveofourown.org/token_dispenser.json
FFF: INFO: 2017-10-18 11:37:30,187: calibre_plugins.fanficfare_plugin.fanficfare.adapters.adapter_archiveofourownorg(118): Will now login to URL (https://archiveofourown.org/user_sessions) as (xxxxxxxxxxx)
FFF: DEBUG: 2017-10-18 11:37:30,190: calibre_plugins.fanficfare_plugin.fanficfare.configurable(983): #####################################
pagecache(POST) MISS: https://archiveofourown.org/user_sessions?authenticity_token=xxxxxxxxxxx&commit=Log in&user_session[login]=XXXXX
@theit8514
theit8514 / Dockerfile
Created August 6, 2017 22:57
Docker file for portainer 855
## DynDNS for Docker with Route53
##
## Dynamic DNS counterpart of James Wilder's nginx-proxy for docker:
## [jwilder/nginx-proxy](https://github.com/jwilder/nginx-proxy).
##
## Containerize cli53
## Discover the expected DNS names following the same conventions than jwilder/nginx-proxy
## Generate the DNS A record file and call cli53 to process it
FROM python:2-slim
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Xunit;
@theit8514
theit8514 / volumes.json
Created June 15, 2016 21:20
Volumes Json file
{
"kind": "books#volumes",
"totalItems": 1442,
"items": [
{
"kind": "books#volume",
"id": "Br5KkgEACAAJ",
"etag": "Yb1RqcQQ1rI",
"selfLink": "https://www.googleapis.com/books/v1/volumes/Br5KkgEACAAJ",
"volumeInfo": {
@theit8514
theit8514 / powershell-web-server.ps1
Last active May 27, 2020 09:47 — forked from 19WAS85/powershell-web-server.ps1
A simple web server built with powershell.
param(
[int]$Port = 8080
);
$routes = @{
"/ola" = { return '<html><body>Hello world!</body></html>' }
}
$url = "http://localhost:$Port/"
$listener = New-Object System.Net.HttpListener
$listener.Prefixes.Add($url)
X should parse Safari 6 error
Expected 3 to be 4. (1)
Expected undefined to equal Object({ url: '[native code]', func: '?', args: [ ], line: null, column: null }). (2)
X should parse Safari 7 error
Expected 2 to be 3. (1)
Expected Object({ url: 'http://path/to/file.js', func: 'foo', args: [ ], line: 52, column: 15, context: null }) to equal Object({ url: 'http://path/to/file.js', func: '?', args: [ ], line: 48, column: 22, context: null }). (2)
Expected Object({ url: 'http://path/to/file.js', func: 'bar', args: [ ], line: 108, column: 107, context: null }) to equal Object({ url: 'http://path/to/file.js', func: 'foo', args: [ ], line: 52, column: 15, context: null }). (3)
Expected undefined to equal Object({ url: 'http://path/to/file.js', func: 'bar', args: [ ], line: 108, column: 107, context: null }). (4)
X should parse Safari 8 error
Expected 2 to be 3. (1)