Skip to content

Instantly share code, notes, and snippets.

import { useMutation, useQuery, UseQueryOptions } from '@tanstack/react-query';
import { trimStart } from 'lodash';
import { parseTemplate } from 'url-template';
import { queryClient } from '.';
import axios from '../../config/axios';
const makeQueryKey = (pathOrPaths?: string[] | string) => {
if (!pathOrPaths) {
return [];
}
@sboli
sboli / sk.ts
Created September 10, 2024 13:42
Sk hit
@Injectable()
export class SkalinTrackingService {
private collectClient: AxiosInstance;
constructor(
@InjectRepository(Manager)
private readonly managerRepository: Repository<Manager>,
) {
this.collectClient = Axios.create({
baseURL: 'https://collect.skalin.io',
headers: {
@sboli
sboli / n8n_gitlab_release_notes.json
Created June 9, 2021 17:39
Template to send a mail with gitlab release notes automatically
{
"name": "Gitlab release notes",
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
440,
import * as winston from 'winston';
import * as WebSocket from 'ws';
import Config from './config';
import Database from './database';
import GameEngine from './gameengine';
import {
ErrorCode,
EventType,
IBonus,
IEvent,
@sboli
sboli / gist:9215b18c5ad9cfed4d019cce729256fb
Last active January 23, 2019 15:27
Resize images and push to S3
import Config from "./config";
import { IHash } from "./models/hash";
import { IItemModel, ItemModel } from "./models/item";
import sharp = require("sharp");
import S3 = require('aws-sdk/clients/s3');
import { rejects } from "assert";
class PictureLibrary {
async resizeAndSave(filePath: string, item: IItemModel) {