This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby fibs | |
require 'benchmark' | |
# === stupid === | |
def recursive_fib(n) | |
n <= 1 ? n : recursive_fib(n-1) + recursive_fib(n-2); | |
end | |
puts Benchmark.measure { recursive_fib(35) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fast_double_fib(n) { | |
var a, b, c, d | |
if (n == 0) { | |
return [0, 1] | |
} else { | |
l = fast_double_fib(Math.floor(n / 2)) | |
a = l[0] | |
b = l[1] | |
c = a * (b * 2 - a) | |
d = a * a + b * b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sample proxypass for couchpotato, rails apps, etc | |
<VirtualHost *:80> | |
ServerName test.xanderstrike.com | |
ServerAdmin [email protected] | |
ProxyPreserveHost On | |
<Location /> | |
Require all granted | |
ProxyPassReverse http://127.0.1:3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Example Server</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="shortcut icon" type="image/png" href="/public/img/favicon.png"> | |
</head> | |
<body> | |
<div id="header"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# fillgaps.rb | |
# Alex Standke 2021 | |
# | |
# Requirements: | |
# * You must have Gaps and Ombi set up and running | |
# * https://github.com/JasonHHouse/gaps | |
# * https://github.com/tidusjar/Ombi | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"event": "media.pause", | |
"user": true, | |
"owner": true, | |
"Account": { | |
"id": 1, | |
"thumb": "<redacted>", | |
"title": "<redacted>" | |
}, | |
"Server": { |