Skip to content

Instantly share code, notes, and snippets.

View madushan1000's full-sized avatar

Madushan Nishantha madushan1000

View GitHub Profile
[657657.444093] SFW2-INext-DROP-DEFLT IN=eth2 OUT= MAC=72:5b:fb:e0:6f:06:00:23:89:ce:a9:31:08:00 SRC=124.232.142.220 DST=10.40.19.33 LEN=58 TOS=0x00 PREC=0x00 TTL=233 ID=54321 PROTO=UDP SPT=58514 DPT=53 LEN=38
[657955.877223] SFW2-INext-ACC-TCP IN=eth2 OUT= MAC=72:5b:fb:e0:6f:06:00:23:89:ce:a9:31:08:00 SRC=115.230.126.149 DST=10.40.19.33 LEN=60 TOS=0x00 PREC=0x00 TTL=40 ID=9807 PROTO=TCP SPT=38077 DPT=22 WINDOW=29200 RES=0x00 SYN URGP=0 OPT (020405B40402080A0269DBA80000000001030307)
[658195.164482] SFW2-INext-ACC-TCP IN=eth2 OUT= MAC=72:5b:fb:e0:6f:06:00:23:89:ce:a9:31:08:00 SRC=202.144.157.221 DST=10.40.19.33 LEN=60 TOS=0x00 PREC=0x00 TTL=46 ID=24551 PROTO=TCP SPT=57137 DPT=22 WINDOW=14600 RES=0x00 SYN URGP=0 OPT (020405B40402080A022080870000000001030304)
[659378.853202] SFW2-INext-ACC-TCP IN=eth2 OUT= MAC=72:5b:fb:e0:6f:06:00:23:89:ce:a9:31:08:00 SRC=115.239.230.138 DST=10.40.19.33 LEN=60 TOS=0x00 PREC=0x00 TTL=41 ID=52211 PROTO=TCP SPT=60225 DPT=22 WINDOW=29200 RES=0x00 SYN URGP=0 OPT (020405B40402080A0
{
"__inputs": [],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "5.2.3"
},
{
series: bionic
description: A highly-available, production-grade Kubernetes cluster.
machines:
'0':
constraints: tags=k8s,master
'1':
constraints: tags=k8s,master
'2':
constraints: tags=k8s,worker
services:
@madushan1000
madushan1000 / README.md
Created September 27, 2020 00:00
Run legacy/privileged extensions in stable/beta firefox
  1. Enable the browser console (about:config -> devtools.chrome.enabled=true) and open it.
  2. Copy the following code change the to your xpi file path and insert it into the browser console.
Cu.import('resource://gre/modules/addons/XPIInstall.jsm')
Cu.import('resource://gre/modules/addons/XPIProvider.jsm')
Cu.import('resource://gre/modules/addons/XPIDatabase.jsm')

var nsIFile = Components.Constructor( "@mozilla.org/file/local;1", "nsIFile", "initWithPath" );
var xpiFile = new nsIFile('<full path to xpi>');
@madushan1000
madushan1000 / README.md
Last active October 7, 2020 18:07
sideload addons on android
  • Install the extension you want in desktop firefox, copy the path the extension(.xpi) file you want to install and copy the content relevent to the extension from exetensions.json(in firefox profile dir)
  • Change all the paths in that section to android paths(usually /data/data/org.mozilla.fenix/files/mozilla/<random string>.profile/extensions/<extension id>.xpi)
  • Edit the extensions.json in the android profile directory and include the section you modified above in addons array.
  • Copy the xpi file to /data/data/org.mozilla.fenix/files/mozilla/<random string>.profile/extensions/<extension id>.xpi
  • Enable adb debugging, enable remote debugging via usb on firefox android
  • Goto about:debugging on desktop firefox and connect to firefox on android, then select Main Process -> inspect and get the console
  • In the console run the following code, make sure to replace the relevent sections with correct paths, and keep a tab loaded with a webpage in fenix
Cu.import('resource://gre/modu
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.11.0-40-generic Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=100300
CONFIG_LD_VERSION=236010000
CONFIG_CLANG_VERSION=0
CONFIG_LLD_VERSION=0
@madushan1000
madushan1000 / 1-readme.md
Last active February 21, 2023 08:36
How to flash/boot bl808 over USB

Compile U-boot

Get riscv-32 musl toolchain. Get u-boot tree with usb support and compile it.

#toolchain
wget https://musl.cc/riscv32-linux-musl-cross.tgz
tar xf riscv32-linux-musl-cross.tgz
export PATH=$PWD/riscv32-linux-musl-cross/bin:$PATH

#u-boot

connect all the jtag pins and connect PU_CHIP pin to nReset/srst/sreset of the ftdi jtag adapter/rv debugger plus

and use the bellow config

pine64jtag.cfg

interface ftdi

#may need to change this to your adapters vid and pid
ftdi_vid_pid 0x0403 0x6014
@madushan1000
madushan1000 / uuu-load-linux.lst
Last active April 14, 2023 21:34
bl808 load linux over fastboot using uuu
CFG: FB: -vid 0x18d1 -pid 0x4e40
FB: getvar version
FB: ucmd setenv fastboot_buffer 0x51000000
FB: download -f out/fw_payload.elf
FB: ucmd setenv fastboot_buffer 0x51500000
FB: download -f linux/arch/riscv/boot/Image.gz
FB: ucmd setenv fastboot_buffer 0x51400000
@madushan1000
madushan1000 / wezterm.lua
Last active August 28, 2023 21:06
wezterm tmux keybindings
local config = {}
config.key_tables = {
tmux_bindings = {
{ key = "a", mods = "CTRL", action=wezterm.action{SendString="\x01"}},
{ key = "\"", mods = "SHIFT", action=wezterm.action{SplitVertical={domain="CurrentPaneDomain"}}},
{ key = "%",mods = "SHIFT", action=wezterm.action{SplitHorizontal={domain="CurrentPaneDomain"}}},
{