Skip to content

Instantly share code, notes, and snippets.

@diegohaz
diegohaz / ariakit.md
Last active July 17, 2023 09:01
What is Ariakit?

What is Ariakit?

Ariakit is the successor of Reakit, an open source library that provides lower-level React components and hooks for building accessible web apps, design systems, and other component libraries.

Why the name change?

Reakit stands for React Toolkit. Ariakit stands for Aria Toolkit, which is better aligned with our goals.

Over the past years, we've been focusing more and more on the ARIA aspects of the library. In the future, we'd like to provide more framework-agnostic utilities.

@seoh
seoh / fp-curriculum.md
Last active August 15, 2023 16:18
A functional programming curriculum

함수형 프로그래밍 커리큘럼

함수형 프로그래밍에 중점을 둔 스칼라 책들은 훌륭한게 많지만 초심자부터 전문가까지 단계별로 가이드할 수 있는 커리큘럼을 추천하려고한다.

  1. 초보자거나 스칼라 입문이라면:
  • 데이브 거넬과 노엘 웰시의 크리에이티브 스칼라(무료). 스칼라를 배우려는 입문자들을 위한 책이고 재미있다.
  • 노엘 웰시와 데이브 거널의 에센셜 스칼라(무료). 견고하고 성능좋고 스칼라다운 코드를 짜도록 도와준다. 다른 언어의 경험이 있는 개발자들을 대상
  1. 더 심도있는 개념을 원하면:
  • 폴 키우사노와 루나르 비아르드나손의 스칼라로 배우는 함수형 프로그래밍($36, 2.8만). 객체지향의 디자인패턴처럼 함수형 프로그래밍에서 자주 쓰이는 패턴인 데이터와 타입클래스들이 어떤 개념인지 직접 구현해보는 책. 스칼라 문법 정도는 익힌 개발자 대상.
@bryanbraun
bryanbraun / git-branching-diagram.md
Last active May 11, 2024 07:03
Example Git Branching Diagram

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.

Creational Patterns (생성 패턴)

  • Abstract Factory : 구체적인 클래스를 지정하지 않고 관련성을 갖는 객체들의 집합을 생성하거나 서로 독립적인 객체들의 집합을 생성할 수 있는 인터페이스를 제공합니다.
  • Builder : 복합 객체의 생성 과정과 표현 방법을 분리함으로써 동일한 생성 공정이 서로 다른 표현을 만들 수 있게 한다.
  • Factory Method : 객체를 생성하는 인터페이스를 정의하지만, 인스턴스를 만들 클래스의 결정은 서브클래스가 한다. Factory Method 패턴에서는 클래스의 인스턴스를 만드는 시점을 서브클래스로 미룬다.
  • Prototype : 프로토타입의 인스턴스를 이용해서 생성할 객체의 종류를 명세하고 이 프로토타입을 복사해서 새로운 객체를 생성한다.
  • Singleton : 클래스의 인스턴스는 오직 하나임을 보장하며 이 인스턴스에 접근할 수 있는 방법을 제공한다.

Structural Patterns (구조 패턴)

  • Adapter : 클래스의 인터페이스를 클라이언트가 기대하는 다른 인터페이스로 변환한다. Adapter패턴은 호환성이 없는 인터페이스 때문에 함께 사용할 수 없는 클래스를 개조하여 함께 작동하도록 해준다.
  • Bridge : 추상화와 구현을 분리하여 각각을 독립적으로 변형할 수 있게 한다.
@mwickett
mwickett / formikApollo.js
Last active December 20, 2022 23:00
Formik + Apollo
import React from 'react'
import { withRouter, Link } from 'react-router-dom'
import { graphql, compose } from 'react-apollo'
import { Formik } from 'formik'
import Yup from 'yup'
import FormWideError from '../elements/form/FormWideError'
import TextInput from '../elements/form/TextInput'
import Button from '../elements/form/Button'
import { H2 } from '../elements/text/Headings'
@n1ru4l
n1ru4l / ArtistList.js
Created January 24, 2017 15:42
mobx + apollo-client + react
import React from 'react'
import { observer } from 'mobx-react'
function ArtistList({ uiState: { artistData } }) {
const { data } = artistData;
if ( !data || !data.artists || !data.artists.length ) {
return <div>No artists bruh.</div>
}
const { artists } = data
return (
@stesie
stesie / index.html
Created April 1, 2016 22:28
AWS IoT-based serverless JS-Webapp Pub/Sub demo
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>AWS IoT Pub/Sub Demo</title>
</head>
<body>
<h1>AWS IoT Pub/Sub Demo</h1>
<form>
<button type="button" id="connect">connect!</button>
@bsergean
bsergean / README.md
Last active March 8, 2022 01:23
offscreen rendering with three.js and headless-gl, in coffee-script

Getting the code

git clone https://gist.github.com/6780d7cc0cabb1b4d6c8.git

Executing the code

$ npm install # maybe npm start will take care of it but just in case
$ npm start && open out.png

> offscreen-sample@1.0.0 start /Users/bsergean/src/offscreen_sample

@kballenegger
kballenegger / cloud-config.yml
Last active October 22, 2015 01:34
Cloud-config sample.
#cloud-config
# convert this file into json like this:
# cat file | ruby -ne 'puts " \"#{$_.gsub("\n","").gsub("\\","\\\\").gsub("\"","\\\"")}\\n\","'
coreos:
etcd:
discovery: https://discovery.etcd.io/...
# multi-region and multi-cloud deployments need to use $public_ipv4
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
@akhoury
akhoury / handlebars-helper-x.js
Last active February 17, 2024 13:25
Handlebars random JavaScript expression execution, with an IF helper with whatever logical operands and whatever arguments, and few more goodies.
// for detailed comments and demo, see my SO answer here http://stackoverflow.com/questions/8853396/logical-operator-in-a-handlebars-js-if-conditional/21915381#21915381
/* a helper to execute an IF statement with any expression
USAGE:
-- Yes you NEED to properly escape the string literals, or just alternate single and double quotes
-- to access any global function or property you should use window.functionName() instead of just functionName()
-- this example assumes you passed this context to your handlebars template( {name: 'Sam', age: '20' } ), notice age is a string, just for so I can demo parseInt later
<p>
{{#xif " name == 'Sam' && age === '12' " }}
BOOM