Skip to content

Instantly share code, notes, and snippets.

@mjuchli
mjuchli / Playground.hs
Created September 12, 2021 21:30
Plutus Playground Smart Contract
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
@mjuchli
mjuchli / orderbook-bittrex.js
Created February 24, 2018 19:24
Bittrex event collector
"use strict";
exports.__esModule = true;
var bittrex = require("node-bittrex-api");
bittrex.options({
'apikey': 'API_KEY',
'apisecret': 'API_SECRET'
});
// Formats a JSON object into a DBUpdate object
function formatUpdate(v) {
var updates = [];
@mjuchli
mjuchli / migrate-gitlab.sh
Created May 3, 2017 17:47
Migration from Gitlab to Github
#!/bin/bash
GITHUB_USER="backender"
GITLAB_URL=$1
NAME=$2
cd ~/dev/gitlab
git clone $GITLAB_URL
cd $NAME
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
@mjuchli
mjuchli / FormatterBlockService.php
Created May 17, 2013 08:50
A simple hack to issue https://github.com/sonata-project/SonataFormatterBundle/issues/19 Data is stored in content instead of rawContent.
<?php
/*
* This file is part of the Sonata project.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/