Skip to content

Instantly share code, notes, and snippets.

@theit8514
theit8514 / FGfeh
Created June 3, 2015 16:03
Same as auto-start-for-i3-simple, except includes ability to search for a specific window name (eg: feh creates a window, but it doesn't attach it to a pid) and to be able to search child pids for windows (eg: running a batch script which runs a lxterm/xterm/uxterm)
#!/bin/sh
feh -xrz.Z --image-bg black --slideshow-delay 30 --no-fehbg /path/to/Backgrounds
@theit8514
theit8514 / AcrHelper.cs
Last active August 29, 2015 14:24
Tenant redirect for IS3
public class AcrHelper
{
public static string GetAcrValue(IEnumerable<string> acrValues, string acrKey)
{
acrKey = string.Format("{0}:", acrKey);
var acrKeyValue = acrValues.SingleOrDefault(x => x.StartsWith(acrKey));
if (acrKeyValue == null) return null;
var acrValue = acrKeyValue.Substring(acrKey.Length);
return acrValue;
@theit8514
theit8514 / FailWidget.html
Created December 8, 2015 21:11
Shows error .plugin/e.fn[c]/<@http://kendo.cdn.telerik.com/2015.3.930/js/kendo.all.min.js:10
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled</title>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.rtl.min.css">
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.930/styles/kendo.mobile.all.min.css">
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)
@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)
@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": {
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 / 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
>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