Skip to content

Instantly share code, notes, and snippets.

View djmeph's full-sized avatar

DJ Meph djmeph

View GitHub Profile
@djmeph
djmeph / 20200317-coronavirus-updates.md
Last active April 22, 2021 08:46
2020-03-17 Coronavirus COVID-19 updates

2020-03-17 Coronavirus/Covid-19 News

Facebook took down my original post, so I'm putting this in a gist and trying to re-circulate.

TL;DR:

  • Infection rates are decreasing in China

  • India is successfully treating COVID-19 and minimizing mortality rates

Keybase proof

I hereby claim:

  • I am djmeph on github.
  • I am djmeph (https://keybase.io/djmeph) on keybase.
  • I have a public key ASAFX-4QrqH0BpcV5K2Ut35cjWpgTFhF56A3LLJDM2tHvgo

To claim this, I am signing this object:

@djmeph
djmeph / open-source-music-coding.md
Last active May 4, 2019 21:09
Open Source Music Coding - Penguicon 2019
@djmeph
djmeph / how-to-photograph-a-supermassive-black-hole-sources.md
Last active May 3, 2019 06:19
How to Photograph a Supermassive Black Hole - Penguicon 2019

Photographing a Supermassive Black Hole

Permalink

https://x.djmeph.net/bh

Sources

The bulk of the presentation was extrapolated from Katie Bouman's 1 hour presentation at Caltech titled, Imaging a Black Hole with the Event Horizon Telescope.

@djmeph
djmeph / node-meetup-2019-01-16.md
Last active January 16, 2019 21:00
Node.js Detroit Meetup 2019-01-16 - Useful Lambda Utilities for AWS's free tier
@djmeph
djmeph / README.md
Last active December 12, 2018 23:41
Node.js Meetup - Geospatial Indexing
@djmeph
djmeph / map-circle.js
Created December 12, 2018 10:35
Draw a circle in google maps
module.exports = (coord, brng, dist) => {
dist = dist / 3958;
brng = brng.toRad();
var lat1 = coord[1].toRad(), lon1 = coord[0].toRad();
var lat2 = Math.asin(Math.sin(lat1) * Math.cos(dist) + Math.cos(lat1) * Math.sin(dist) * Math.cos(brng));
var lon2 = lon1 + Math.atan2(Math.sin(brng) * Math.sin(dist) * Math.cos(lat1), Math.cos(dist) - Math.sin(lat1) * Math.sin(lat2));
if (isNaN(lat2) || isNaN(lon2)) return null;
return [lon2.toDeg(), lat2.toDeg()];
}
@djmeph
djmeph / HOWTO.md
Last active September 28, 2018 19:16
Radically Self-Reliant Crypto Bot Workshop

Radically Self-Reliant Crypto Bot Workshop

Launch Ubuntu 16.04 EC2 Instance

  1. Select Ubuntu Server 16.04 LTS 64-bit
  2. Recommend General Purpose - t2.small instance type. (1 CPU core, 2GB RAM)
  3. Select a subnet. us-east-1x, us-east-2x, us-west-2x are $0.023/hr for t2.small
  4. Select 8GB GP2 SSD ($0.80/month)
function post($url,$data, $username, $password) {
$file = file_get_contents($data, true);
$process = curl_init();
curl_setopt($process, CURLOPT_URL, $url);
curl_setopt($process, CURLOPT_USERPWD, "$username:$password");
curl_setopt($process, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($process, CURLOPT_HTTPHEADER, $this->headers);
curl_setopt($process, CURLOPT_HEADER, 1);
curl_setopt($process, CURLOPT_VERBOSE, false);