Skip to content

Instantly share code, notes, and snippets.

View TvrtkoM's full-sized avatar

Tvrtko Majstorović TvrtkoM

View GitHub Profile
@TvrtkoM
TvrtkoM / extractMarketImages.ts
Created November 7, 2022 17:50
save market images
import { gql, GraphQLClient } from "graphql-request";
import fs from "fs";
import path from "path";
const client = new GraphQLClient(
"https://processor.rpc-0.zeitgeist.pm/graphql",
);
const allMarketsQuery = gql`
query MyQuery {
version: "3.4"
services:
db:
image: postgres:12
restart: always
volumes:
- /var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres

Keybase proof

I hereby claim:

  • I am tvrtkom on github.
  • I am tvrtkomaj (https://keybase.io/tvrtkomaj) on keybase.
  • I have a public key ASB5bm4Ejn87AzgyuZ_jGe8O5v-ZGoHWOXEZWCVc9WfZTAo

To claim this, I am signing this object:

@TvrtkoM
TvrtkoM / .spacemacs
Last active April 4, 2018 17:40
Spacemacs config
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@TvrtkoM
TvrtkoM / index.js
Created March 20, 2018 22:49 — forked from MichalZalecki/index.js
How to import RxJS 5
// Import all
import Rx from "rxjs/Rx";
Rx.Observable
.interval(200)
.take(9)
.map(x => x + "!!!")
.bufferCount(2)
.subscribe(::console.log);
@TvrtkoM
TvrtkoM / BinaryTreeSerializer.ts
Created March 4, 2018 19:40
Binary tree random tree + serializer/deserialzier
import { _ } from 'lodash';
class TreeNode {
value: number;
leftNode: TreeNode;
rightNode: TreeNode;
constructor(value: number) {
this.value = value;
}
addLeftNode(node: TreeNode) {
function copyFile(source, target, cb) {
var cbCalled = false;
var rd = fs.createReadStream(source);
rd.on("error", function(err) {
done(err);
});
var wr = fs.createWriteStream(target);
wr.on("error", function(err) {
done(err);
# ~/.tmuxinator/vimWithConsole.yml
name: webpackProject
root: .
# Optional tmux socket
# socket_name: foo
# Runs before everything. Use it to start daemons etc.
# pre: sudo /etc/rc.d/mysqld start
# ~/.tmuxinator/vimWithConsole.yml
name: vimWithConsole
root: .
# Optional tmux socket
# socket_name: foo
# Runs before everything. Use it to start daemons etc.
# pre: sudo /etc/rc.d/mysqld start
@TvrtkoM
TvrtkoM / .vimrc
Last active November 21, 2016 19:45
my .vimrc file
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
filetype off