Skip to content

Instantly share code, notes, and snippets.

@bluthen
bluthen / skyconv_hadec.py
Last active November 30, 2020 17:46
A simple HA-DEC Coordinate frame with atropy v4.2
"""
A HA-DEC frame to work in astropy 4.2
"""
import astropy.units as u
import erfa
from astropy.coordinates import representation as r
from astropy.coordinates.attributes import (TimeAttribute,
QuantityAttribute,
EarthLocationAttribute)
from astropy.coordinates.baseframe import BaseCoordinateFrame, RepresentationMapping
@bluthen
bluthen / node_aes_gcm_stream_base64.js
Last active April 27, 2018 16:38
Node aes-gcm-stream and Web Crypto API
var aesgcm = require('aes-gcm-stream');
var fs = require('fs');
var encryptToB64 = function (config, message) {
return new Promise(function (resolve, reject) {
var encrypt = aesgcm.encrypt(config);
var buffer = [];
encrypt.on('data', function (chunk) {
buffer.push(chunk);

Keybase proof

I hereby claim:

  • I am bluthen on github.
  • I am bluthen (https://keybase.io/bluthen) on keybase.
  • I have a public key ASC_07ctvhpy7oZzRN0yMw5zhH12SeV44mD30NWCOio0kQo

To claim this, I am signing this object: