Skip to content

Instantly share code, notes, and snippets.

agatsoh

Block or report user

Report or block agatsoh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Deploy WETH contract
import json
from eth_utils import encode_hex
from web3 import HTTPProvider, Web3
from solc import compile_source
from web3.contract import ConciseContract
# Solidity source code
contract_source_code = '''
View payment_script_goerli
import requests
import time
def payment():
return requests.post('http://localhost:5011/api/v1/payments/0xb0723f82B595De47920C9A1605b7dF754d8cDe5C/0xf1a500EA6B3afDcF98C8ff466dB68875003Bb686',
headers={ 'Content-Type': 'application/json', }, json={ 'amount': 1 })
View failedtoretrieveltskernel
$ ./install-lts-kernel-v3.sh
Do not just run this. Examine and judge. Run at own risk.
Do not run on virtualbox.
Intended to be used on ssd/harddisk.
Press enter to continue
Installing with yay
[sudo] password for krishna:
View raiden_payment
import requests
import time
def payment():
return requests.post('http://localhost:5012/api/v1/payments/0x610f3c3C1998FAd6A659A9f5Bb83962DA27eAf1d/0x80Cf7AcFde7Cb110675cD7B478c167cF1A5b2f0e',
headers={ 'Content-Type': 'application/json', }, json={ 'amount': 1 })
View merge_arrays_cpp
#include <iostream>
using std::cout;
using std::cin;
struct Array {
int *A;
int size;
int length;
};
@agatsoh
agatsoh / python3.7.3_on_MX_Linux_18_1.md
Last active Sep 12, 2019
Install python 3.7 on MX Linux 18.1
View python3.7.3_on_MX_Linux_18_1.md

Installing Python 3.7.3 on MX-linux 18.1

I was following this blog to install python 3.7.3 on my MX-linux 18.1 machine. Step by step procedure is as follows

  1. Install the pre-requisites

sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \
    libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev
@agatsoh
agatsoh / list-unit-files
Created Oct 12, 2018
systemctl list-unit-files --state=enabled output
View list-unit-files
systemctl list-unit-files --state=enabled
UNIT FILE STATE
var-lib-snapd-snap-core-5328.mount enabled
org.cups.cupsd.path enabled
autovt@.service enabled
avahi-daemon.service enabled
bluetooth.service enabled
dbus-org.bluez.service enabled
dbus-org.freedesktop.Avahi.service enabled
dbus-org.freedesktop.NetworkManager.service enabled
@agatsoh
agatsoh / oct_11_2018_20_26_49
Created Oct 11, 2018
journalctl -keb -1 output at the particular time.
View oct_11_2018_20_26_49
[krishna@krishna-pc ~]$ journalctl -keb -1
Oct 11 20:24:53 krishna-pc kernel: RSP: 002b:00007ffcc35a6aa8 EFLAGS: 00000206 ORIG_RAX: 0000000000000053
Oct 11 20:24:53 krishna-pc kernel: RAX: ffffffffffffffda RBX: 00007ffcc35a6b60 RCX: 00007ff4031d337b
Oct 11 20:24:53 krishna-pc kernel: RDX: 0000000000000000 RSI: 00000000000001ff RDI: 00007ffcc35a6b60
Oct 11 20:24:53 krishna-pc kernel: RBP: 0000000000000012 R08: 0000000000000000 R09: 0000562b4a330bd0
Oct 11 20:24:53 krishna-pc kernel: R10: 0000000000000011 R11: 0000000000000206 R12: 00000000000001c0
Oct 11 20:24:53 krishna-pc kernel: R13: 0000000000000078 R14: 00007ffcc35a6b76 R15: 0000000000000000
Oct 11 20:24:57 krishna-pc kernel: watchdog: BUG: soft lockup - CPU#7 stuck for 22s! [TaskSchedulerFo:3697]
Oct 11 20:24:57 krishna-pc kernel: Modules linked in: ccm rfcomm fuse bnep uvcvideo btusb btrtl btbcm videobuf2_vmalloc btintel videobuf2_memops videobuf2_v4l2 videobuf2_common bluetooth vid>
Oct 11 20:24:57 krishna-pc kernel: ghash_clmulni_intel vfat zstd_deco
View dmesg_output_11_oct_2018
sudo dmesg
[sudo] password for krishna:
[ 0.000000] microcode: microcode updated early to revision 0x96, date = 2018-05-15
[ 0.000000] Linux version 4.18.12.a-1-hardened (builduser@anthraxx) (gcc version 8.2.1 20180831 (GCC)) #1 SMP PREEMPT Thu Oct 4 14:02:21 CEST 2018
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux-hardened root=UUID=91896567-444d-4862-94a8-69b7bfc37336 rw quiet resume=UUID=b430f61c-62cd-48f3-a3e2-3b4758466072
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
@agatsoh
agatsoh / oct_11_2018_16_08_10
Created Oct 11, 2018
journalctl -keb -1 command output
View oct_11_2018_16_08_10
Oct 11 16:08:05 krishna-pc kernel: usb 1-6: Product: Bluetooth Radio
Oct 11 16:08:05 krishna-pc kernel: usb 1-6: Manufacturer: Realtek
Oct 11 16:08:05 krishna-pc kernel: usb 1-6: SerialNumber: 00e04c000001
Oct 11 16:08:05 krishna-pc kernel: hidraw: raw HID events driver (C) Jiri Kosina
Oct 11 16:08:05 krishna-pc kernel: usbcore: registered new interface driver usbhid
Oct 11 16:08:05 krishna-pc kernel: usbhid: USB HID core driver
Oct 11 16:08:05 krishna-pc kernel: input: PixArt Dell MS116 USB Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/0003:413C:301A.0001/input/input5
Oct 11 16:08:05 krishna-pc kernel: hid-generic 0003:413C:301A.0001: input,hidraw0: USB HID v1.11 Mouse [PixArt Dell MS116 USB Optical Mouse] on usb-0000:00:14.0-1/input0
Oct 11 16:08:05 krishna-pc kernel: random: fast init done
Oct 11 16:08:05 krishna-pc kernel: EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
You can’t perform that action at this time.