Skip to content

Instantly share code, notes, and snippets.

@agcty
agcty / martin.yaml
Last active January 25, 2023 22:19
model:
base_learning_rate: 1.0e-6
target: ldm.models.diffusion.ddpm.LatentDiffusion
params:
linear_start: 0.00085
linear_end: 0.0120
num_timesteps_cond: 1
log_every_t: 200
timesteps: 1000
first_stage_key: "jpg"
@agcty
agcty / useMetamask.tsx
Last active September 16, 2021 14:42
useMetamask hook
import React, { createContext, useEffect, useReducer, useRef } from "react"
import MetaMaskOnboarding from "@metamask/onboarding"
import Cookies from "js-cookie"
type ApiState =
| "IDLE"
| "CONNECT_INIT"
| "CONNECTING"
| "ERROR"
@agcty
agcty / config.yml
Created June 9, 2020 09:10
ThemeKit config file for Debut upgrade
development:
password: ${SHOPIFY_API_PASSWORD}
theme_id: ${DEVELOPMENT_THEME_ID}
store: your-store.myshopify.com
staging:
password: ${SHOPIFY_API_PASSWORD}
theme_id: ${STAGING_THEME_ID}
store: your-store.myshopify.com
@agcty
agcty / .gitlab-ci.yml
Created June 9, 2020 09:09
GitLab CI file for debut upgrade
image: python:2
stages:
- staging
- production
staging:
image: python:2
stage: staging
script:
@agcty
agcty / variables
Last active June 9, 2020 09:04
Example environment variables config for shopify env variables
SHOPIFY_API_PASSWORD=your_api_password
STAGING_THEME_ID=your_staging_theme_id
PRODUCTION_THEME_ID=your_production_theme_id
DEVELOPMENT_THEME_ID=your_development_theme_id
@agcty
agcty / .eslintrc.js
Last active November 22, 2020 17:08
Eslintrc for auto imports next.js
module.exports = {
env: {
browser: true,
node: true,
es2020: true,
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
@agcty
agcty / tsconfig.js
Last active November 22, 2020 17:09
Update tsconfig for absoulte imports next.js
{
"compilerOptions": {
"target": "ES2017",
"lib": ["es6", "dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
@agcty
agcty / .babelrc
Created May 9, 2020 09:56
Babel rc for absolute imports next.js
{
"presets": ["next/babel"],
"plugins": [
[
"module-resolver",
{
"root": ["./"],
"alias": {
"@components": "./src/components",
"@api": "./src/api",
@agcty
agcty / settings.json
Created March 27, 2020 18:37
VSCode Settings for auto fixes
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true
}
@agcty
agcty / eslint.rc.js
Last active November 22, 2020 17:11
module.exports = {
env: {
browser: true,
node: true,
es2020: true,
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",