Skip to content

Instantly share code, notes, and snippets.

View baymac's full-sized avatar
👋

Parichay Barpanda baymac

👋
View GitHub Profile
@baymac
baymac / event_seq_test.patch
Created August 17, 2023 05:56
Test to demo that event sequence is not respected
diff --git a/packages/sign-client/package.json b/packages/sign-client/package.json
index 9c61b52b..36c016af 100644
--- a/packages/sign-client/package.json
+++ b/packages/sign-client/package.json
@@ -24,7 +24,7 @@
"build:source": "rollup --config rollup.config.js",
"build": "npm run build:pre; npm run build:source; npm run build:types",
"test:pre": "rm -rf ./test/tmp && mkdir ./test/tmp",
- "test:run": "vitest run --dir test/sdk",
+ "test:run": "vitest run test/sdk/persistence.spec.ts",
@baymac
baymac / Submit tx api.sh
Created March 27, 2022 16:45
Cardano Node Submit API from Daedulus Cardano Node
## Set the Cardano Node Socket Path
export CARDANO_NODE_SOCKET_PATH=$(ps ax | grep -v grep | grep cardano-wallet | grep mainnet | sed -E 's/(.*)node-socket //')
## testing that it worked
echo $CARDANO_NODE_SOCKET_PATH
## Changing to the Documents folder and creating a folder
cd ~/
cd Documents
mkdir nami-submit

Keybase proof

I hereby claim:

  • I am baymac on github.
  • I am parichayb (https://keybase.io/parichayb) on keybase.
  • I have a public key ASBIL2gtOIHVQfrWB_VZg4ODZMPwYsGlSvm74gCbKpmV2wo

To claim this, I am signing this object:

layer*[] split(network *net, LAYER_TYPE layer_type) {
layer *split_layer = net->layers;
int i = 0;
while(layer_type != split_layer->type) {
split_layer++;
i++;
}
// a b c d e f
// 0, 3
return [0, i];
@baymac
baymac / openlink.ts
Last active February 3, 2021 14:25
Opens link passed as argument in default browser
@baymac
baymac / Packaging Log
Created November 9, 2019 16:59
The log contains warnings and file not found error
yarn run v1.19.1
$ yarn build && electron-builder build --publish never
$ concurrently "yarn build-main" "yarn build-renderer"
$ cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.main.prod.js --colors
$ cross-env NODE_ENV=production node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.prod.js --colors
[1] Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade caniuse-lite browserslist`
[0] Hash: b0ace21e23866de7d874
[0] Version: webpack 4.16.3
[0] Time: 6681ms
[0] Built at: 11/09/2019 10:16:30 PM
@baymac
baymac / CMakeLists.txt
Last active October 2, 2019 10:26
Given two initials searches the list of words that starts with the initials
cmake_minimum_required(VERSION 3.14)
project(mnemonics C)
set(CMAKE_C_STANDARD 11)
add_executable(mnemonics main.c wordlist.h)
@baymac
baymac / Parichay's feedback.md
Created August 27, 2019 11:43
A retrospective document of Jenkins GSoC 2019

Application period & Before

What did work well?

I started interacting on the community gsoc-sig gitter channel from May 3rd. It was nice and cordial response from the org admins and mentors. That really helped to be motivated and have confidence. We had frequent meet ups on hangouts. Everything was very professionally managed.

What should we improve?

I only think to improve the participants count and project ideas. We can embrace new tech stacks. The millennials are more inclined towards newer programming languages like Python, JS, Kotlin etc. This is also important for Jenkins to keep up with the pace. To take advantages of all the developments.

@baymac
baymac / request.json
Created August 20, 2019 19:21
GitLab System hook request for repository update event
{
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: null,
pipesCount: 0,
@baymac
baymac / gitlab-job-dsl.groovy
Last active December 8, 2022 16:43
A sample job dsl configuration of gitlab folder organisation
private boolean isSandbox() {
def locationConfig = jenkins.model.JenkinsLocationConfiguration.get()
if (locationConfig != null && locationConfig.getUrl() != null) {
locationConfig.getUrl().contains("staging")
} else {
System.getenv("ENVIRONMENT") == "sandbox"
}
}
List<Map> gitlab = []