Skip to content

Instantly share code, notes, and snippets.

@dajare
dajare / time2base36.sh
Last active January 3, 2021 18:25
Shell script to convert unix timestamp to base36 (alphanumeric, lowercase)
#!/bin/bash
# takes unix timestamp and converts to base36
# ht: https://en.wikipedia.org/wiki/Base36#bash_implementation
value=$(date +%s)
result=""
base36="0123456789abcdefghijklmnopqrstuvwxyz"
while true; do
result=${base36:((value%36)):1}${result}
if [ $((value=${value}/36)) -eq 0 ]; then
@dajare
dajare / README.md
Last active December 20, 2020 10:35
Day and Night

It's all about the Sun

When the earth faces towards the sun, that part of the sun has "daytime". The part of the earth facing away from the sun will have "night".

Sun lights the earth

The earth is shaped like a ball:

Spinning globe

@dajare
dajare / maketext.js
Created April 12, 2013 13:20
Make.text bookarklet: place JS code between quotes in <a href="">make.text</a> to create the bookmarklet; converts webpage to markdown.
javascript:(function(){/**%20Make.text%201.5.%20Trevor%20Jim.%20License:%20GPL%20v2%20(www.fsf.org/copyleft/gpl.html).%20**/%20var%20logging%20=%20false;%20var%20logString%20=%20'';%20var%20unhandled%20=%20{};%20%20function%20log(exn,msg)%20{%20if%20(!logging)%20return;%20logString%20+=%20msg%20+%20':%20'%20+%20exn%20+%20'%5cn';%20}%20var%20w%20=%20window.open('');%20%20var%20d%20=%20w.document;%20var%20last%20=%20null;%20function%20addText(s)%20{%20if%20(last%20!=%20null)%20d.write(last);%20last%20=%20s;%20}%20function%20llapLast(s)%20{%20if%20(last)%20last%20=%20last.replace(/%20%20%20%20$/,s);%20}%20function%20finishOutput()%20{%20addText(%22%22);%20}%20var%20links%20=%20new%20Array(window.location);%20%20var%20rlinks%20=%20{};%20rlinks[window.location]%20=%200;%20var%20linkTitles%20=%20new%20Array();%20var%20atP%20=%20true;%20var%20atLeft%20=%20true;%20var%20atNoWS%20=%20true;%20%20var%20left%20=%20'%5cn';%20function%20pushLeft(s)%20{%20var%20oldLeft%20=%20left;%20left%20+=%20s;%20if%20(atP)%20addText(s);
@dajare
dajare / Readable-Bookmarklet.md
Created February 28, 2020 10:29 — forked from akaleeroy/Readable-Bookmarklet.md
Readable Bookmarklet

Readable Bookmarklet

Bookmarklet Browser Enhancement Readability

Readable dark theme

rdbl.us

Readable is an application that helps you read more of the web. It reformats text — on any website — according to your exact specifications.

@dajare
dajare / install-upgrade-skype-ubuntu.md
Created January 12, 2018 10:27
How to install Skype on Ubuntu 17.04+ using repo

Install / Upgrade Skype on Ubuntu 17.04 / 17.10

Original at: WebsiteForStudents.com

07/17/2017 | Applications, Linux Ubuntu | 12 Comments

Looking for help installing Skype? This brief tutorial is going to show students and new users how to install Skype for Linux on Ubuntu 17.04 / 17.10 desktop. Skype is a very popular free VOIP software used to make free Skype-to-Skype calls and text to stay in touch with friends and family.

A Linux version of Skype was recently updated.. and this adds some new features including, enhanced user interface, cloud-based group chat experience, PulseAudio support and file transfer improvements across multiple devices and bunch of other fixes.

@dajare
dajare / PHP Sort by Scripture (Bible)
Created March 15, 2018 21:26 — forked from oleosjo/PHP Sort by Scripture (Bible)
Comp function to sort PHP Array by Bible Verses (Scripture Books)
function scripturesort($a, $b) {
if ($a == $b) {return 0;}
$order=array("Genesis", "Exodus", "Leviticus", "Numbers", "Deuteronomy", "Joshua", "Judges", "Ruth", "1 Samuel", "2 Samuel", "1 Kings", "2 Kings", "1 Chronicles", "2 Chronicles", "Ezra", "Nehemiah", "Esther", "Job", "Psalm", "Proverbs", "Ecclesiastes", "Song of Solomon", "Isaiah", "Jeremiah", "Lamentations", "Ezekiel", "Daniel", "Hosea", "Joel", "Amos", "Obadiah", "Jonah", "Micah", "Nahum", "Habakkuk", "Zephaniah", "Haggai", "Zechariah", "Malachi", "Matthew", "Mark", "Luke", "John", "Acts", "Romans", "1 Corinthians", "2 Corinthians", "Galatians", "Ephesians", "Philippians", "Colossians", "1 Thessalonians", "2 Thessalonians", "1 Timothy", "2 Timothy", "Titus", "Philemon", "Hebrews", "James", "1 Peter", "2 Peter", "1 John", "2 John", "3 John", "Jude", "Revelation");
$fa = $a;
$fb = $b;
preg_match('/^..(.+?)\b/', $a, $matches);
$a = trim(substr($matches[0],0,4));
@dajare
dajare / cvu-member-list.md
Last active June 15, 2018 11:12
Council of Validating Universities: Member List

Members List

Member institutions of the Council of Validating Universities – as of 2017.01.13.

The following is a list of members organisations and the Council Member for that organisation (as at September 2016).

Institution  |  Main Lead
Anglia Ruskin University  |  Peter Worker

@dajare
dajare / html5_template.html
Last active May 14, 2018 09:53 — forked from nathansmith/html5_template.html
Simple HTML5 Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" />
<title>untitled</title>
<!-- link rel="stylesheet" href="" / -->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.18.1/build/cssfonts/cssfonts-min.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.18.1/build/cssbase/cssbase-min.css">
@dajare
dajare / foss-sis.md
Last active May 7, 2018 13:58
Open Source SIS

SIS packages I have looked at

Info

  • SIS = [Student Information System][w]
  • Some of the VLE's in Capterra's "[19 Free and Open Source LMSs...][c]" blog intersect with SIS's.

Dedicated SIS Systems

  • [eduTrac SIS][ets]
@dajare
dajare / koine-greek-sources.md
Created May 1, 2018 19:46
Texts and Grammars for Koine Greek

Here's my set of concentric circles on Koine Greek and its close relatives with a bit of commentary and some resources for each in Greek (where readily available), moving out from the centre:

  1. LXX and NT : there's plenty already around on this, so suffice it here to note the (probably) lesser known volume (only one of a projected set) by Henry St. John Thackeray, [A Grammar of Old Testament Greek according to the Septuagint][hsjt] (Cambridge, 1909). (Due to be superseded by current projects on this front, but still useful.)

It is worth bearing in mind that there are gradations of language/register, even within this body of literature. Things like Greek Jeremiah, or the gospel of Mark, are less refined than Greek Isaiah or Proverbs and the gospel of Luke. Within the "Apocrypha", too, a continuum can be seen: Tobit and Judith are relatively simple; the additions to Esther more "literary", and 3 and 4 Maccabees are getting much closer to "Attic".

  1. Apostolic Fathers : as they're usually c