Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sortable: `put: []` demo</title>
<!-- AngularJS -->
<!-- Sortable.js -->
## Db creation
PGPASSFILE=$CNODE_HOME/priv/dbsynch scripts/postgresql-setup.sh --createdb
# mainnet : 192.168.1.190
# directory : cardano-db-sync
# database : cexplorer
# user/pass : poolboy/p@55w0rd
############################################################################################
PGPASSFILE=config/pgpass db-sync-node/bin/cardano-db-sync-extended \
--config config/mainnet-config.yaml \
@mogadget
mogadget / gist:207bc7dd6e0ee526175862b30b9ea4d6
Last active December 31, 2021 12:10
Rollback to Cardano node to 1.18.0
cd $HOME/cardano-node
cp dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-cli-1.19.1/x/cardano-cli/build/cardano-cli/cardano-cli ~/.local/bin &&
cp dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-1.19.1/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin
cp dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-cli-1.20.0/x/cardano-cli/build/cardano-cli/cardano-cli ~/.local/bin &&
cp dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-1.20.0/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin
cp dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-cli-1.23.0/x/cardano-cli/build/cardano-cli/cardano-cli ~/.local/bin &&
cp dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-1.23.0/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin
@mogadget
mogadget / tmux-cheatsheet.markdown
Created August 18, 2020 09:56 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@mogadget
mogadget / gist:7d23ceb9c550f2e0eb1f4add4665470e
Last active July 28, 2020 11:28
Installing Haskell on Raspberry Pi4 running on Ubuntu 20.04
Install ghc 8.6.5
sudo apt-get install haskell-platform
This also include cabal2.4 but we need cabal 3.0
wget http://hackage.haskell.org/package/cabal-install-3.0.0.0/cabal-install-3.0.0.0.tar.gz 1
tar -xf cabal-install-3.0.0.0.tar.gz
cd cabal-install-3.0.0.0
cabal update
cabal install
{
"friendly_name": "Adasea_Singapore2",
"addr": "134.209.104.215",
"port": 3002,
"valency": 1
},
{
"operator": "AKIBA",
"addr": "139.99.61.246",
"port": 10006,
@mogadget
mogadget / piglatin.ex
Created October 29, 2016 12:11
Piglatin in elixir
defmodule PigLatin do
def translate(sentence) do
list(String.split(sentence," "))
end
def list(list) do
list(list, [])
|> Enum.reverse
end
defmodule Flat do
def list(list) do
list(list, [])
|> Enum.reverse
end
def list([h | t], acc) when h == [], do: list(t, acc)
def list([h | t], acc) when is_list(h), do: list(t, list(h, acc))
def list([h | t], acc), do: list(t, [h | acc])
def list([], acc), do: acc
@mogadget
mogadget / gulpfile.js
Created January 26, 2016 11:23 — forked from wesbos/gulpfile.js
FAST Browserify + Reactify + Babelify
// Update: Hey Folks - I've got a full Gulpfile with everything else over at https://github.com/wesbos/React-For-Beginners-Starter-Files
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var browserify = require('browserify');
var reactify = require('reactify');
var babelify = require('babelify');
var watchify = require('watchify');
var notify = require('gulp-notify');