Skip to content

Instantly share code, notes, and snippets.

@amirrustam
amirrustam / module-output-build-450.log
Created May 5, 2022 16:50
Debugging PR#91 kurtosis-tech/eth2-merge-kurtosis-module
# Source: https://app.circleci.com/pipelines/github/kurtosis-tech/eth2-merge-kurtosis-module/450/workflows/bf293a0e-83ee-47d1-96e5-ce40a4dc1b85/jobs/597
DEBU[2022-05-05T15:47:46Z] Received gRPC request to method '/module_api.ExecutableModuleService/IsAvailable' with args:
DEBU[2022-05-05T15:47:46Z] gRPC request to method '/module_api.ExecutableModuleService/IsAvailable' succeeded with response:
DEBU[2022-05-05T15:47:46Z] Received gRPC request to method '/module_api.ExecutableModuleService/Execute' with args:
params_json:"{}"
INFO[2022-05-05T15:47:46Z] Deserializing the following execute params:
{}
INFO[2022-05-05T15:47:46Z] Successfully deserialized execute params
INFO[2022-05-05T15:47:46Z] Adding 1 participants logging at level 'info'...

Via fetch spying

Let's start off by storing the GQL API endpoint as an environment variable for convenient retrieval within our tests.

// cypress.json

{
  "env": {
    "gqlEndpoint": "http://localhost:4000/graphql"
@amirrustam
amirrustam / machine.js
Created March 24, 2020 18:27
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
@amirrustam
amirrustam / gist:47115cac14b4f38c6fadb35c6c2bcd98
Created January 23, 2019 19:24
AWS Solutions Engineering Questions

AWS Solutions Engineer Questions

Datapipline

  • Streaming data pipeline whitepapers and/or sample architecture designs?
  • Kensis Steams vs MSK
  • Since the max size of a data blob streamed in Kensis is 1MB, what are some architecture patterns for handeling larger blob sizes?
  • Refrence data uploaded data to S3, same pattern used in SQS.
# coding: utf8
""" Attempt at gevent-compatible requests without any monkeypatching """
import geventhttpclient
from geventhttpclient import httplib as gehttplib
from geventhttpclient.useragent import CompatResponse
import httplib as _httplib
import requests
@amirrustam
amirrustam / tmux-cheatsheet.markdown
Created August 1, 2016 22:12 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
# Create a directory
mkdir ~/tmux-install
cd ~/tmux-install
# Get the files
curl -OL http://downloads.sourceforge.net/tmux/tmux-1.5.tar.gz
curl -OL http://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.16-stable.tar.gz
# Extract them
tar xzf tmux-1.5.tar.gz
@amirrustam
amirrustam / gist:8c73eb2331ac1e0822a5
Created March 7, 2016 10:19
Fix Elementary OS Freya Flickering Problems
sudo apt-get install mesa-utils
sudo mkdir /etc/X11/xorg.conf.d/
echo -e 'Section "Device"\n Identifier "Intel Graphics"\n Driver "Intel"\n Option "AccelMethod" "sna"\n Option "TearFree" "true"\nEndSection' | sudo tee /etc/X11/xorg.conf.d/20-intel.conf
sudo reboot
@amirrustam
amirrustam / swipe.js
Created December 28, 2015 21:03 — forked from SleepWalker/swipe.js
A simple swipe detection on vanilla js
var touchstartX = 0;
var touchstartY = 0;
var touchendX = 0;
var touchendY = 0;
var gesuredZone = document.getElementById('gesuredZone');
gesuredZone.addEventListener('touchstart', function(event) {
touchstartX = event.screenX;
touchstartY = event.screenY;
@amirrustam
amirrustam / readme.md
Created December 24, 2015 01:25 — forked from livingston/readme.md
Vanilla JavaScript Templates

Usage

var welcome_user = new Template('#{welcome} #{name}!!');

welcome_user.parse({ welcome: "Hello", name: "John" });
//returns "Hello John!!"

welcome_user.parse({ welcome: "Hola", name: "Peter" });