Skip to content

Instantly share code, notes, and snippets.

@CliffCrerar
CliffCrerar / install-linux-desktop.sh
Created June 4, 2023 14:41
Install WSL with desktop GUI
# Requires WSL2 on windows
# Required windows config
# ---------------------------------
## in powershell run
# wsl --set-default-version 2
## to set wsl 2 as default
# ---------------------------------
## Then run
# wsl -l -v
@Chandankkrr
Chandankkrr / UserRegistrationTest.cs
Last active September 6, 2022 06:55
Blazor web application E2E Testing using Playwright
using System;
using System.Threading.Tasks;
using FluentAssertions;
using Microsoft.Playwright;
using Xunit;
using Xunit.Abstractions;
using Xunit.Sdk;
namespace Asp.BlazorClient.Tests.End2End
{
@ghost1372
ghost1372 / publish.yml
Last active May 15, 2024 12:06
I use this action to publish project, compress to Zip and upload to GitHub release
name: "Publish"
on:
push:
tags:
- "v*"
env:
PROJECT_PATH: WpfApp6/WpfApp6.csproj
ZIP_PATH: WpfApp6/bin/Release/net5.0-windows/win-x86/publish/WpfApp6-Portable.zip
@lontivero
lontivero / README.md
Last active April 8, 2022 10:25
Wasabi CLI

Wasabi CLI

A tiny bash script to effortless interaction with Wasabi RPC Server.

$ ./wcli.sh listkeys | head -10 

fullkeypath       internal  keystate  label  p2wpkhscript                              pubkey                                                              pubkeyhash
84'/0'/0'/1/0     true      2         0      b0ba6bb14314bacd1f908eb2b9ecc74e0b041717  039d67f2c7c3dd1ed0ac301e677fe3abf6f059067796553211d562f46f2e420043  b0ba6bb14314bacd1f908eb2b9ecc74e0b041717
84'/0'/0'/1/1     true      2         0      6b470de643697581b2717e6d2b878470a26d5e83  02efaf8fddc729e51826439ebac6e5782f60890262fd6c0702f537062bc4fe00f2  6b470de643697581b2717e6d2b878470a26d5e83
# Back-up the .lnd dir
`cp -r .lnd/ .lnd.old`
# copy the .lnd dir to another machine that runs a non-pruned full node
`scp [source] [target]`
# Install GO
`wget https://dl.google.com/go/go1.12.3.linux-amd64.tar.gz`
`sha256sum go1.12.3.linux-amd64.tar.gz | awk -F " " '{ print $1 }'`
# output should be `3924819eed16e55114f02d25d03e77c916ec40b7fd15c8acb5838b63135b03df`
`tar -C /usr/local -xzf go1.12.3.linux-amd64.tar.gz`
`export PATH=$PATH:/usr/local/go/bin`
@johnnyasantoss
johnnyasantoss / .gitconfig
Last active May 13, 2024 16:58
JetBrains Rider as Default Merge and Diff tool
# Diff with JetBrains Rider
[diff]
tool = rider
[difftool]
prompt = false
[difftool "rider"]
cmd = D:\\\\Program\\ Files\\\\Jetbrains\\\\apps\\\\Rider\\\\ch-0\\\\181.4379.788\\\\bin\\\\rider64.exe diff "$LOCAL" "$REMOTE"
# Merge with JetBrains Rider
[merge]
@Richard-Mathie
Richard-Mathie / Redis Cluster Setup with Docker Swarm.md
Last active May 11, 2022 12:58
Redis cluster setup with docker swarm

Redis Cluster Setup with Docker Swarm

Setup

./redis.sh

Test

test the redis cluster

@Scapal
Scapal / paginate.js
Last active April 21, 2016 13:33
Aurelia pagination components
export class PaginateValueConverter {
toView(array, pageSize, currentPage) {
if(array === undefined || pageSize === undefined || pageSize == '0')
return array;
if(currentPage === undefined || currentPage == '')
currentPage = 0;
let first = parseInt(currentPage) * parseInt(pageSize);
let end = Math.min(first + parseInt(pageSize), array.length);
@fragsalat
fragsalat / MultiObserver.js
Last active January 27, 2017 13:45
Aurelia multi observer class to observe multiple properties on one object or multiple properties on multiple objects. See usage of observe function
import {ObserverLocator, inject} from 'aurelia-framework';
/**
* Helper class to observe multiple properties at once
*/
@inject(ObserverLocator)
export class MultiObserver {
/**
* Get injected observer
@maxant
maxant / market.js
Last active November 18, 2022 09:53
Files for creating a trading engine with Node.js.
// /////////////////////////////////////////////////
// this file contains all the classes related to a
// market.
// /////////////////////////////////////////////////
var log4js = require('log4js');
var logger = log4js.getLogger(require('path').basename(__filename, '.js'));
require('es6-collections');
var _ = require('underscore');
/**