Skip to content

Instantly share code, notes, and snippets.

View e1en0r's full-sized avatar

Elenor e1en0r

View GitHub Profile
@e1en0r
e1en0r / backup.sh
Created May 9, 2020 22:05
Simple backup script
#!/bin/bash
do_backup() {
source_dir="$(cd "$(dirname "$1")"; pwd)"
source_file="$(basename "$1")"
source="$source_dir/$source_file"
if [ "$2" != "" ]; then
dest_root="$2"
else
@e1en0r
e1en0r / AccessibilityContext.js
Last active October 11, 2019 19:19
React accessibility provider
import React from 'react';
export const AccessibilityContext = React.createContext({
accessible: undefined,
setAccessible: (/* accessible */) => {},
});

Keybase proof

I hereby claim:

  • I am e1en0r on github.
  • I am elenor (https://keybase.io/elenor) on keybase.
  • I have a public key whose fingerprint is 85BA 9FA3 239F 42C6 101B 8BD4 5553 2751 9358 7F39

To claim this, I am signing this object:

@e1en0r
e1en0r / alt-nav-demo.js
Created March 22, 2011 20:49
An alternative to Phork/it's current demo.js nav positioning method. This will slide the nav on scroll rather than fix its position.
var $nav = $('div.columns .column.right').each(function() {
var $this = $(this)
$window = $(window),
$document = $(document)
;
if ($this.height() + $this.offset().top < $window.height() - $('#footer-shift').height()) {
$this
.data('top', $this.position().top)
.css('position', 'absolute')