Skip to content

Instantly share code, notes, and snippets.

View mjradwin's full-sized avatar

Michael J. Radwin mjradwin

View GitHub Profile
@mjradwin
mjradwin / omer-counter.html
Last active April 14, 2026 13:47
Omer Counter for Tel Aviv
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sefirat HaOmer</title>
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@400;500;600&family=Frank+Ruhl+Libre:wght@400;700&display=swap" rel="stylesheet">
<style>
:root {
--gold: #c9a84c;
@mjradwin
mjradwin / example.html
Last active April 14, 2026 13:28
shabbat parsha only
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="UTF-8">
<title>Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div id="results"></div>
<script>
document.addEventListener('DOMContentLoaded', function() {
@mjradwin
mjradwin / index.html
Last active October 5, 2023 04:32
Hebcal FullCalendar client-side. Uses the Hebcal JS API to determine holidays and candle-lighting times
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Jewish Calendar</title>
<style>
html,
body {
margin: 0;
@mjradwin
mjradwin / hebcal-omer.html
Last active April 24, 2023 15:56
Displaying today's omer count
<div id="hebcal-omer"></div>
<script defer>
function pad2(number) {
if (number < 10) {
return '0' + number;
}
return '' + number;
}
let dt = new Date();
if (dt.getHours() > 19) {
@mjradwin
mjradwin / hebcal-fullcalendar-function.html
Last active September 26, 2023 15:02
Hebcal + FullCalendar with a function to modify JSON event feed
<!DOCTYPE html>
<html lang="en">
<head>
<title>Jewish Calendar</title>
<style>
html, body {
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
font-size: 14px;
}
</style>
#cloud-config
package_upgrade: true
packages:
- strongswan
- strongswan-plugin-eap-mschapv2
- moreutils
- iptables-persistent
- unattended-upgrades
@mjradwin
mjradwin / calibre-news-email.sh
Created December 5, 2016 04:47
calibre-news-email.sh
#!/bin/sh
RECIPE="$1"
OUTFILE=`mktemp /tmp/news.XXXXXXXXXX.mobi`
ADDRESS="example_1234567@kindle.com"
# uses heirloom-mailx on Ubuntu which supports -a for attachments
/opt/calibre/ebook-convert \
"$RECIPE.recipe" $OUTFILE --output-profile kindle && \
@mjradwin
mjradwin / index.html
Last active August 27, 2021 21:46
Hebcal Shabbat API with AJAX
<!DOCTYPE html>
<html><head>
<meta charset="UTF-8">
<title>Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div id="results"></div>
<script>
document.addEventListener('DOMContentLoaded', function() {
# Example YAML to get you started quickly.
# Be aware that YAML has indentation based scoping.
# Code completion support is available so start typing for available options.
swagger: '2.0'
# This is your document metadata
info:
version: "1.0.0"
title: Hebcal API
description: Jewish Calendar, Hebrew Date Converter, Holidays
@mjradwin
mjradwin / hebcal-shabbat-style.css
Last active October 25, 2015 20:59
Hebcal example of how to style Shabbat Times
.hebcal-container {
font-family: "Gill Sans MT","Gill Sans",GillSans,Arial,Helvetica,sans-serif;
font-size: small;
}
.hebcal-container h3 {
font-family: Georgia,Palatino,"Times New Roman",Times,serif;
}
ul.hebcal-results { list-style-type:none }
ul.hebcal-results li {
margin-bottom: 11px;