Skip to content

Instantly share code, notes, and snippets.

View saranrapjs's full-sized avatar

Jeff Sisson saranrapjs

View GitHub Profile
@coolov
coolov / svg-fonts.js
Last active February 21, 2022 21:07
A script for inlining fonts into SVG documents. There is a better version of this script here: https://github.com/coolov/svgum
/*
!!!!!
USE THIS TOOL INSTEAD:
https://github.com/coolov/svgum
!!!!
If you use https://app.diagrams.net/ with google webfonts and export to svg and then
@andrewosh
andrewosh / README.md
Created May 11, 2020 02:44
A smal,l end-to-end example of using Hyperdrive/Hyperswarm to replicate a drive

Note: To keep this even smaller, we're using a small helper module called the hyperswarm replicator, which wraps a few Hyperswarm setup details.

@MHBalsmeier
MHBalsmeier / eccodes_on_ubuntu.md
Last active February 8, 2024 07:15
How to install Eccodes on Ubuntu

How to Install Eccodes on Ubuntu

Eccodes is an open source library made by ECMWF for reading and writing grib files, which is the most common file format for meteorological und oceanographic data in operational use (while in research, Netcdf is mainly used). If one wants to work with grib files seriously, one will have to install it earlier or later. On top of that, one will also have to make sure C and Python code is able to import the library's functionality.

First of all, I would highly recommend not to use anything else than Linux, preferably Ubuntu, for working with meteorological data, especially grib files. If you do not want to migrate to Linux completely, consider either a dual boot or a virtual machine.

I just show you the commands with minimal explanation.

Installing an older version with apt

@chendo
chendo / _document.js
Last active June 2, 2022 02:54
Server side rendering (SSR) in Next.js with styled-components, styled-jsx, and emotion.
import Document, { Head, Main, NextScript } from 'next/document'
import { renderToString } from 'react-dom/server'
import { extractCritical } from 'emotion-server'
import { ServerStyleSheet } from 'styled-components'
import flush from 'styled-jsx/server'
export default class MyDocument extends Document {
static async getInitialProps(ctx) {
const styledComponentsSheet = new ServerStyleSheet()
@asciimike
asciimike / app.yaml
Created September 11, 2018 18:56
Testing Google Cloud IAP (https://cloud.google.com/iap) with GAE 2nd Generation Runtimes
runtime: nodejs8
@okdistribute
okdistribute / index.js
Last active January 28, 2019 08:29
dat with webrtc
var webrtc = require('webrtc-swarm')
var signalhub = require('signalhub')
var hyperdrive = require('hyperdrive')
var memdb = require('memdb')
var pump = require('pump')
var DEFAULT_SIGNALHUBS = 'https://signalhub.mafintosh.com'
var drive = hyperdrive(memdb())

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@tomtaylor
tomtaylor / names.txt
Last active April 28, 2017 16:16
English village names generated by Tensorflow
Allers Bottom
Culack
Swrarby
Fenwall St Eastake
Anbarth
St Ninhope
Thawkanham Water Green
Mige Lane
Up Maling
Firley Dinch
20:10 dat-gitter-bot> (scriptjs) @mafintosh can you contrast hyperlog vs hypercore for their log capabilities, you dropped hypercore at some point. Is hypercore by itself as useful for an append only log use case?
20:10 <•mafintosh> @scriptjs right
20:10 <•mafintosh> so hyperlog is a DAG structure (a merkle dag even)
20:10 <•mafintosh> where data you insert can point to other data you insert
20:10 <•mafintosh> which is really great if you have multiple peers collaborating on the same data structure
20:11 <•mafintosh> a hyperlog is also always fully replicated since that makes the replication protocol pretty trivial
20:11 <•mafintosh> (i really need to write some white paper on that at some point)
20:11 <•mafintosh> hypercore is just simple single-writer append-only logs
20:11 <•mafintosh> so abstraction-wise hyperlog > hypercore
20:12 <•mafintosh> we could even make hyperlog run on top of hypercore which i really wanna do
@cryptix
cryptix / pgpTestTool.go
Created December 28, 2014 16:20
PGP file encryption in golang
package main
import (
"archive/zip"
"fmt"
"log"
"os"
"time"
"github.com/cryptix/go/logging"