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
// ==UserScript== | |
// @name Springfield! Springfield! Easier on the eyes | |
// @version 1.1 | |
// @downloadURL https://gist.github.com/ccjmne/08ba9455e92c1f03f1e3d13a6918062d/raw/9ce29d68f0d6f87d3976b131e2ccfce487554d2f/springfieldspringfield.co.uk_episodes-links.user.js | |
// @updateURL https://gist.github.com/ccjmne/08ba9455e92c1f03f1e3d13a6918062d/raw/9ce29d68f0d6f87d3976b131e2ccfce487554d2f/springfieldspringfield.co.uk_episodes-links.user.js | |
// @description Adds links to the previous and next episodes on the scripts pages of Springfield! Springfield! | |
// @author ccjmne | |
// @match *://www.springfieldspringfield.co.uk/* | |
// @grant GM_addStyle | |
// ==/UserScript== |
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
/* | |
Simple dark background for the springfieldspringfield.co.uk, with a broader, re-centered container for the actual scripts. | |
Also features more discreet and elegants scrollbars and html clean-up. | |
Find it on userstyles.org: https://userstyles.org/styles/133526/springfield-springfield-tv-scripts-dark | |
-- | |
I also wrote a script for Tampermonkey/GreaseMonkey that adds links to the previous and next episodes on the scripts pages. | |
Find it on OpenUserJS: https://openuserjs.org/scripts/ccjmne/Springfield!_Springfield!_Previous_and_next_episodes_links | |
*/ | |
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
const AWS = require('aws-sdk'); | |
ses = new AWS.SES(); | |
const debug = false; | |
// Base64 'Orca — Comptabilité' is 'T3JjYSDigJQgQ29tcHRhYmlsaXTDqQ==' | |
const Source_64 = 'T3JjYSDigJQgQ29tcHRhYmlsaXTDqQ=='; | |
function _proxyLambdaCallback(context, status, body) { | |
// TODO: what context method to use on failure? |
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
SELECT | |
emce_date, | |
ttce_cert_fk, | |
CASE | |
WHEN emce_date IS null OR emce_date > max(trng_date + trty_validity * INTERVAL '1 month')::date | |
THEN max(trng_date + trty_validity * INTERVAL '1 month')::date | |
ELSE emce_date | |
END AS expiry, | |
CASE | |
WHEN |
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
SELECT | |
trem_empl_fk, | |
array_agg(ttce_cert_fk) AS ttce_cert_fk, | |
array_agg(expiry) AS expiry, | |
array_agg(valid) AS valid, | |
array_agg(validForAWhile) AS validForAWhile | |
FROM ( | |
SELECT | |
trem_empl_fk, |
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
SELECT | |
cert_pk, | |
COALESCE(valid, 0) AS valid, | |
COALESCE(validForAWhile, 0) AS validForAWhile, | |
COALESCE(expired, 0) AS expired, | |
ceil(employeesCount * cert_target / 100::numeric) AS target, | |
CASE | |
WHEN COALESCE (valid, 0) >= ceil(employeesCount * cert_target / 100::numeric) | |
THEN 'success' | |
WHEN valid >= ceil(employeesCount * 2/3::numeric * cert_target / 100::numeric) |
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
SELECT | |
site, | |
array_agg(cert_pk) AS cert_pk, | |
array_agg(valid) AS valid, | |
array_agg(validForAWhile) AS validForAWhile, | |
array_agg(expired) AS expired, | |
array_agg(target) AS target, | |
array_agg(status) AS status | |
FROM ( |
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
SELECT | |
cert_pk, | |
COALESCE(sum(valid), 0) as valid, | |
COALESCE(sum(validForAWhile), 0) as validForAWhile, | |
COALESCE(sum(expired), 0) as expired, | |
count(*) FILTER (WHERE COALESCE(valid, 0) >= ceil(employeesCount * cert_target / 100::numeric)) as success, | |
count(*) FILTER (WHERE COALESCE(valid, 0) < ceil(employeesCount * cert_target / 100::numeric) AND valid >= ceil(employeesCount * 2/3::numeric * cert_target / 100::numeric)) as warning, | |
count(*) FILTER (WHERE COALESCE(valid, 0) < ceil(employeesCount * 2/3::numeric * cert_target / 100::numeric)) as danger | |
FROM ( |
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
SELECT | |
site_dept_fk, | |
array_agg(cert_pk) AS cert_pk, | |
array_agg(valid) AS valid, | |
array_agg(validForAWhile) AS validForAWhile, | |
array_agg(expired) AS expired, | |
array_agg(success) AS success, | |
array_agg(warning) AS warning, | |
array_agg(danger) AS danger | |
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
#!/bin/sh | |
set -e | |
mkdir __tmp && cd __tmp | |
wget https://github.com/ccjmne/orca-deploy/files/1066037/setup.tar.gz && tar -zxvf setup.tar.gz | |
sed -i *.sh -e 's/\r$//' && chmod +x *.sh && ./setup.sh | |
mv orca.conf .. && mv update.sh .. | |
cd - && rm -Rf __tmp |
OlderNewer