Skip to content

Instantly share code, notes, and snippets.

View awave1's full-sized avatar

Artem Golovin awave1

  • Vancouver, Canada
  • 19:26 (UTC -07:00)
View GitHub Profile
@awave1
awave1 / machine.js
Created September 1, 2021 22:32
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: "challenge-state",
initial: "draft",
states: {
draft: {
on: {
CREATE: "created"
}
},
@awave1
awave1 / machine.js
Created August 27, 2021 19:47
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@awave1
awave1 / init.vim
Last active October 27, 2021 20:58
call plug#begin("~/.vim/plugged")
" Themes
Plug 'dracula/vim'
Plug 'dikiaap/minimalist'
" fern
"Plug 'lambdalisue/nerdfont.vim'
"Plug 'lambdalisue/fern.vim'
/**
* US area codes arranged by state
* source: NPA Database - https://www.nationalnanpa.com/reports/reports_npa.html
*/
export const US_AREA_CODES = {
Alabama: ['205', '251', '256', '334', '659', '938'],
Alaska: ['907', 'Hyder', '236', '250', '778'],
Arizona: ['480', '520', '602', '623', '928'],
Arkansas: ['327', '479', '501', '870'],
California: [
@awave1
awave1 / launch.json
Created January 22, 2021 03:30
ts-node aware launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Server",
"type": "node",
"request": "launch",
"args": ["${workspaceRoot}/server/src/index.ts"],
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
"cwd": "${workspaceRoot}/server",
@awave1
awave1 / dl.fish
Last active September 22, 2020 02:41
function dl
set prev (pwd)
set songs "$HOME/Documents/Music/Songs"
cd $songs
youtube-dl -x --audio-format \"wav\" $argv
cd $prev
end
@awave1
awave1 / Form.ts
Last active September 3, 2020 17:35
Simple generic function for setting values on change when using `useState` hook
// example usage
import React from 'react';
enum SelectVal {
ONE,
TWO,
THREE
}
FROM continuumio/miniconda3
RUN git clone https://github.com/facebookresearch/demucs.git /app
WORKDIR /app
RUN conda env update -f environment-cpu.yml
RUN conda init bash
RUN echo "conda activate demucs" > ~/.bashrc
@awave1
awave1 / fish-ubuntu.sh
Last active June 6, 2020 22:21
Quick fish shell setup
#!/usr/bin/env bash
sudo apt install fish
FISH_SH=$(which fish)
echo "$FISH_SH" | sudo tee -a /etc/shells
chsh -s "$FISH_SH"
# fisher
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish
{ [Error: ./scripts/core/services/3dViewer.js
Module not found: Error: Can't resolve '@renoworks/measurements-view' in '/Users/awave/work/surfaces-config/dist/fasttrack/scripts/core/services'
resolve '@renoworks/measurements-view' in '/Users/awave/work/surfaces-config/dist/fasttrack/scripts/core/services'
Parsed request is a module
using description file: /Users/awave/work/surfaces-config/dist/fasttrack/package.json (relative path: ./scripts/core/services)
aliased with mapping '@renoworks/measurements-view': '/Users/awave/work/surfaces-config/dist/fasttrack/node_modules/@renoworks/measurements-view/lib/es5' to '/Users/awave/work/surfaces-config/dist/fasttrack/node_modules/@renoworks/measurements-view/lib/es5'
using description file: /Users/awave/work/surfaces-config/dist/fasttrack/package.json (relative path: ./scripts/core/services)
Field 'browser' doesn't contain a valid alias configuration
using description file: /Users/awave/work/surfaces-config/dist/fasttrack/node_modules/@r