Skip to content

Instantly share code, notes, and snippets.

View Kielan's full-sized avatar
💻
Java Rust Go Swift C# Typescript React Graphql C C++ Python

Kielan Kielan

💻
Java Rust Go Swift C# Typescript React Graphql C C++ Python
View GitHub Profile
@Kielan
Kielan / Compiler Notes
Last active May 2, 2022 04:02
compiler prettier and
https://drafts.csswg.org/css-syntax-3/#input-byte-stream
CSS parsing
The process consists of
bytes->stream codepoints->stream tokens->parse css syntax output
The output is a CSSStyleSheet object.
1. User agent recieves a stream of bytes
(typically coming over the network or
from the local file system).
@fscm
fscm / install_cmake.md
Last active March 25, 2025 16:39
[macOS] Install CMake

[macOS] Install CMake

Instructions on how to install the CMake tool on macOS.

Uninstall

First step should be to unsinstall any previous CMake installation. This step can be skipped if no CMake version was previously installed.

To uninstall any previous CMake installations use the following commands:

#include<bits/stdc++.h> // header file for all c++ libraries
using namespace std; // stdout library for printing values
bool custom_sort(double a, double b) /* this custom sort function is defined to
sort on basis of min absolute value or error*/
{
double a1=abs(a-0);
double b1=abs(b-0);
return a1<b1;
}
int main()
@jakewtaylor
jakewtaylor / GoogleFontLoader.js
Last active November 28, 2018 23:19
GoogleFontLoader React Component.
import React from 'react';
class GoogleFontLoader extends React.PureComponent {
link = null;
createLink = () => {
const { fonts } = this.props;
const families = fonts.reduce((acc, font) => {
const family = font.font.replace(/ +/g, '+');
@nikolasburk
nikolasburk / instructions.md
Last active March 7, 2020 17:50
Use the Contentful GraphQL API inside a GraphQL Playground

Use the Contentful GraphQL API inside a GraphQL Playground

The Contentful GraphQL API ships with GraphiQL by default. To get even better workflows (such as multiple tabs, speciyfing HTTP headers or work with multiple GraphQL APIs side-by-side), you can use a GraphQL Playground.

1. Get the endpoint for your Contentful GraphQL API

The endpoint of your Contentful GraphQL API has the following structure: https://cdn.contentful.com/spaces/{SPACE}/graphql/alpha/explore?access_token={CDA_TOKEN}

There are two placeholders that need to be replaced:

@jackawatts
jackawatts / ts-jest.md
Last active June 14, 2023 08:09
Getting started with Typescript, React and Jest

Getting Started

  1. Install:
  • jest: npm install --save-dev jest
  • ts-jest: npm install --save-dev ts-jest @types/jest
  1. Modify package.json
"jest": {
  "transform": {
 "^.+\\.tsx?$": "ts-jest"
@ibraheem4
ibraheem4 / postgres-brew.md
Last active April 19, 2025 14:27 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update