Skip to content

Instantly share code, notes, and snippets.

View cartant's full-sized avatar

Nicholas Jamieson cartant

View GitHub Profile
@acutmore
acutmore / README.md
Last active January 21, 2024 20:30
Emulating a 4-Bit Virtual Machine in (TypeScript\JavaScript) (just Types no Script)

A compile-time 4-Bit Virtual Machine implemented in TypeScript's type system. Capable of running a sample 'FizzBuzz' program.

Syntax emits zero JavaScript.

type RESULT = VM<
  [
    ["push", N_1],         // 1
    ["push", False],       // 2
 ["peek", _], // 3
@gomezjuliana
gomezjuliana / CFPtips.md
Last active August 9, 2019 23:26
Here are some lessons I've learned from reading more than 800 CFPs

I've been helping to curate the content for JSConf Colombia for three years now and I wanted to pass on some advice I've gathered these years. The first year I worked on the selection committee, which is the first round of voting in a two round process. My second year, I was on the content team and nominated someone for the committee as well as participated in the second round of voting (where we look at the top talks from the first round and curate talks based on which make most sense for our conference and audience). This year, I'm one of three directors for the conference as well as the leader of the content team (the first time in my life rising through any ranks! hahaha). In these three years I've probably read more than 800 CFPs and there's a few things that'll help you get picked for conferences

  1. Research the conference
  • It's like when you're looking for a job, you want to make sure that a company wants you but you also wanna make sure that you want the company so make sure you research the
@elijahmanor
elijahmanor / common-react-bugs.md
Last active May 29, 2019 19:51
Common Bugs when Learning React

Common Bugs when Learning React

The following list tries to summarize some of the things that a developer may encounter while learning React. The list focuses on scenarios that result in actual bugs (things that don't work) or things that cause warnings in the console.

  • using class prop instead of className (for/htmlFor, etc...)
  • trying to set the style prop with a string
  • not having a parent element or fragment
  • not binding (at all or incorrectly)
  • using the wrong lifecycle hook
  • misspelling componentWillReceiveProps
@staltz
staltz / readme.ts
Created April 25, 2018 17:31
callbag-typescript-proof-of-concept
/**
* Callbag loves TypeScript
*
* Copy-paste this into http://www.typescriptlang.org/play/index.html
*/
// A Callbag dynamically receives input of type I
// and dynamically delivers output of type O
type Callbag<I, O> = {
(t: 0, d: Callbag<O, I>): void;
@mikelehen
mikelehen / generate-pushid.js
Created February 11, 2015 17:34
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 2, 2024 05:49
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j