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
{
@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 April 11, 2024 12:54
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');
/**
anonymous
anonymous / Twilightify.js
Created June 17, 2013 00:30
Replace JavaScript errors on your page with Twilight Zone prologues. Errors from the console are unaffected.
var hasStartedEpisode = false;
window.onerror = function(e){
// credits roll
if(!hasStartedEpisode){
if(Math.random() > 0.5){
console.warn("You're traveling through another dimension.\nA dimension not only of sight and sound, but of mind.\nA journey into a wondrous land whose boundaries are that of imagination.\n--Your next stop: The Twilight Zone");
}
else{
console.warn("There is a fifth dimension, beyond that which is known to man.\nIt is a dimension as vast as space, and as timeless as infinity.\nIt is the middle ground between light and shadow - between science and superstition - and it lies between the pit of man's fears and the summit of his knowledge.\nThis is the dimension of imagination.\nIt is an area which we call: The Twilight Zone.\n");
}