Skip to content

Instantly share code, notes, and snippets.

View oleksify's full-sized avatar
🇺🇦

O.T. oleksify

🇺🇦
View GitHub Profile
import type { AxiosInstance, AxiosRequestConfig } from "axios";
import useSWR, { type SWRConfiguration, type SWRResponse } from "swr";
export type BadRequestError = {
error: {
failures?: {
detail: string;
source?: {
pointer: string;
};
title: string;
@oleksify
oleksify / machine.js
Last active August 5, 2021 19:35
Generated by XState Viz: https://xstate.js.org/viz
const taskMachine = Machine({
id: 'taskStatus',
initial: 'todo',
states: {
todo: {
on: {
DROP: {
internal: true,
cond: 'canDrop'
},
@oleksify
oleksify / index.html
Created November 8, 2019 14:39 — forked from jenniferlynparsons/index.html
getLongestUniformSequenceRange (http://jsbench.github.io/#bae346a0642b418b8c9f434155220156) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>getLongestUniformSequenceRange</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@oleksify
oleksify / dabblet.css
Created June 19, 2012 04:52
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
ArgumentError in Spree::Admin::PaymentsController#fire
wrong number of arguments (3 for 1)
Rails.root: /Users/devilcoders/Projects/muza-dev/muzarena
Application Trace | Framework Trace | Full Trace
/Users/devilcoders/.rvm/gems/ruby-1.9.3-p125/bundler/gems/spree-0903c7eb4db5/core/app/models/spree/payment_method/check.rb:17:in `capture'
/Users/devilcoders/.rvm/gems/ruby-1.9.3-p125/bundler/gems/spree-0903c7eb4db5/core/app/models/spree/payment/processing.rb:40:in `block in capture!'
/Users/devilcoders/.rvm/gems/ruby-1.9.3-p125/bundler/gems/spree-0903c7eb4db5/core/app/models/spree/payment/processing.rb:146:in `protect_from_connection_error'
/Users/devilcoders/.rvm/gems/ruby-1.9.3-p125/bundler/gems/spree-0903c7eb4db5/core/app/models/spree/payment/processing.rb:31:in `capture!'
deface (0.7.2) lib/deface/override.rb:166:in `clone'
deface (0.7.2) lib/deface/override.rb:166:in `source_element'
deface (0.7.2) lib/deface/override.rb:263:in `block (2 levels) in apply'
nokogiri (1.5.0) lib/nokogiri/xml/node_set.rb:239:in `block in each'
nokogiri (1.5.0) lib/nokogiri/xml/node_set.rb:238:in `upto'
nokogiri (1.5.0) lib/nokogiri/xml/node_set.rb:238:in `each'
deface (0.7.2) lib/deface/override.rb:232:in `block in apply'
deface (0.7.2) lib/deface/override.rb:217:in `each'
deface (0.7.2) lib/deface/override.rb:217:in `apply'
deface (0.7.2) lib/deface/action_view_extensions.rb:6:in `initialize'
== PrefixTableNames: migrating ===============================================
-- rename_table(:pages, :spree_pages)
rake aborted!
An error has occurred, all later migrations canceled:
Mysql::Error: Can't find file: './rd_radio_development/pages.frm' (errno: 2): RENAME TABLE `pages` TO `spree_pages`
@oleksify
oleksify / gist:1724807
Created February 2, 2012 17:41
sore_all
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*
*= require store/spree_auth
*= require store/spree_api
*= require store/spree_promo
Started GET "/assets/store/all.css" for 127.0.0.1 at 2012-02-02 19:36:27 +0200
Compiled store/all.css (15ms) (pid 30993)
Compiled store/spree_auth.css (5ms) (pid 30993)
Compiled store/spree_core.css (15ms) (pid 30993)
Compiled store/base.css (12ms) (pid 30993)
Compiled jquery.formalize.css (7ms) (pid 30993)
Compiled store/screen.css (489ms) (pid 30993)
Compiled store/spree_api.css (13ms) (pid 30993)
Compiled store/spree_promo.css (11ms) (pid 30993)
Compiled store/rdr.css (31ms) (pid 30993)