Skip to content

Instantly share code, notes, and snippets.

View chrisl777's full-sized avatar

Chris Livdahl chrisl777

View GitHub Profile
@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@tuantvk
tuantvk / react-native-mobx-context.js
Last active April 20, 2021 17:06
Example for React Native use Mobx and React Context
// store/pokemon.store.js
import {
get,
computed,
action,
makeAutoObservable,
createTransformer,
} from "mobx";
class PokemonStore {
@aqrojo
aqrojo / ReactComponents.js
Created April 7, 2021 22:55
mobx-introduction_04_observer
import { observable } from 'mobx'
import { observer } from 'mobx-react'
const store = observable({
prop1: 1,
prop2: 2,
...
})
function ComponentA () {
@cnicodeme
cnicodeme / fixes.md
Last active May 8, 2024 18:03
List of 5,000 Most Frequently Used Domain Name Prefixes and Suffixes - Ordered By Length
@sangkukbae12
sangkukbae12 / mobx_observable_actions.js
Created April 27, 2020 23:03
react mobx obervable with actions
// Bound Actions
import { observable } from "mobx";
class Counter {
@observable count = 0;
@action.bound
increment() {
this.count++;
}
}
const counter = new Counter();
@hellendag
hellendag / mergeResolvers.js
Last active November 20, 2023 19:16
Merge mocked GraphQL resolvers
// @flow
type ResolvedScalar = string | number | boolean | null;
type ResolvedValue =
| ResolvedScalar
| Array<ResolvedValue>
| {[key: string]: ResolvedValue};
type ResolverFunction = (...args: Array<any>) => ResolvedValue;
export type ResolverMap = {
@cellularmitosis
cellularmitosis / EmojiPointersDemo.swift
Created August 15, 2018 18:11
Representing pointer values as emoji can be useful for "visually" debugging certain issues, like cell reuse, etc.
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let window = UIWindow(frame: UIScreen.main.bounds)
@adrianhall
adrianhall / AppSyncAPI.yaml
Last active September 25, 2024 01:43
A CloudFormation template for DynamoDB + Cognito User Pool + AppSync API for the Notes tutorial
---
Description: AWS AppSync Notes API
Parameters:
APIName:
Type: String
Description: Name of the API - used to generate unique names for resources
MinLength: 3
MaxLength: 20
AllowedPattern: '^[a-zA-Z][a-zA-Z0-9_]*$'
@muZk
muZk / README.md
Created December 12, 2017 16:42
How to use hover with react-jss

How to use hover with react-jss

Let's say we have the following style:

const styles = (theme) => ({
  title: {
    color: theme.color,
  },
})