Skip to content

Instantly share code, notes, and snippets.

View armincerf's full-sized avatar

Alex Davis armincerf

View GitHub Profile
export function useSubscription({
client,
key,
onError,
operation,
variables,
url,
opts = {},
}) {
const queryClient = useQueryClient();
@armincerf
armincerf / Editor.svelte
Created December 27, 2020 15:22
Video editor timeline
<script lang="ts">
import { onDestroy } from "svelte";
import type { VideoDetails } from "../helpers/mediaHelpers";
import { isInRange, cutIntersects } from "../helpers/videoHelpers";
import Timeline from "./Timeline.svelte";
import Cropper from "./Cropper.svelte";
import ExportForm from "./ExportForm.svelte";
import Modal from "./Modal.svelte";
export let videoUrl: string;
(ns juxtaminute.app
(:require [re-graph.core :as re-graph]
[tick.alpha.api :as tick]
[reagent.core :as r]
[re-frame.core :as rf]
[medley.core :as medley]
[reagent.dom :as rdom]
[juxtaminute.common :as common]
[clojure.string :as str]))
(js/console.log "start")
@armincerf
armincerf / git-clubhouse
Last active May 7, 2021 12:04
Run `git config --global clubhouse.token {token}` to set your ch token, then run `git clubhouse {id}` (make sure git-clubhouse is in your $PATH and executable) to checkout a new branch and push it to trigger the clubhouse hook
#! /usr/bin/env bash
function main () {
local id="$1"
local token=$(git config --global --get clubhouse.token)
local story=$(curl -s "https://api.clubhouse.io/api/v3/stories/${id}?token=${token}")
local username=$(git config --global --get github.user)
local name=$(echo "${story}" | jq -r '.name' | iconv -t ascii//TRANSLIT | sed -E s/[^a-zA-Z0-9]+/-/g | sed -E s/^-+\|-+$//g | tr A-Z a-z)
local branch="${username}/ch${id}/${name}"
git checkout ${branch} 2>/dev/null || git checkout -b ${branch}
@armincerf
armincerf / keybase.md
Created November 16, 2017 14:58
Keybase proof

Keybase proof

I hereby claim:

  • I am armincerf on github.
  • I am armincerf (https://keybase.io/armincerf) on keybase.
  • I have a public key ASAaMW9y4lNLE5usfe-UKGsfGQhkkzIx8ZNkigaH-2EKBwo

To claim this, I am signing this object: