Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Rampersad ryanmr

View GitHub Profile
View forms.md

Meta

For the last few days, I have been thinking about how much I hate forms and meanwhile, how there are other aspects of the ecosystem that aren't great either.

Forms

What's the deal with forms? Forms, ever since webforms back in the day, seem to be at the unsolvable core of modern frontend development. In today's React take on forms, there have been numerous libraries to help solve them.

Some early work was to integrate them with redux-form. I skipped that one, so I know nothing about it at this point.

View mkdirp.md
warning @nestjs/platform-express > multer > mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
warning typeorm > mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
warning @nestjs/cli > webpack > mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
warning @nestjs/cli > webpack > terser-webpack-plugin > cacache > mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
warning @nestjs/cli > webpack > watchpack > chokidar > fsevents > node-pre-gyp > mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promise
View typeorm-nestjs-error.md

Trying to use NestJS and TypeORM? Trying to use the provided ConfigModule with forRootAsync? Cool, you might get an error.

import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { ConfigModule, ConfigService } from '@nestjs/config';
View exp-cycles-in-data.md

Data in cycles

I'm trying to break a set of data into "cycles" for further processing. The data has no additional flags associated, so I can't identify the cycles any other way except numerically. Visually plotting data shows the cycles, but I'm looking for a robust numerically approach.

example image of cycles

Current approach

Given a list of datapoints...

View osn2019.md

Hey everyone,

I am living without a blog right now, but that has been on my mind over the last couple weeks. Setting up a blog tonight is definitely not workable, but setting up a simple blog-like gist is no problem at all.

I wanted to share here by Open Source North 2019 thoughts!

A brief preamble

In 2016, I learned of Open Source North and was lucky enough to receive a ticket from a friend. I attended that OSN as my first conference ever. Since then, I have promoted the idea of OSN being the best introduction conference for those new to the field. It's a local event, it's not too big, it's priced right (either inexpensive enough to be self-purchased as a student or pre-work, or cheap enough for a new hire to jump into without raising red flags at work for cost). I also say this is also a wonderfully well-rounded conference, ranging from frontend, to backend, to devops and more. Everything that intersects t

View keybase.md

Keybase proof

I hereby claim:

  • I am ryanmr on github.
  • I am ryanmr (https://keybase.io/ryanmr) on keybase.
  • I have a public key ASCn_b5Lvo--MjFb3wtRVQ3lbpaXc__Ivkw35xm3bLVQ4wo

To claim this, I am signing this object:

View chapters.py
import sys
from mutagen.id3 import ID3, CTOC, CHAP, TIT2, CTOCFlags
from mutagen import File
def main():
print "hi"
# target_file = "ns61-ian.mp3"
target_file = "pk43.mp3"
print_tags(target_file)
View Cards.scala
def split():(Deck, Deck) = {
val s = size()
val h = s / 2
val d1 = new Deck()
val d2 = new Deck()
for (i <- 1 to s) {
getCard() match {
case Some(card) => {
if (i < h) {
d1.addCard(card)
You can’t perform that action at this time.