Skip to content

Instantly share code, notes, and snippets.

@namezis
namezis / installing-node-with-nvm.md
Created November 23, 2022 03:05 — forked from d2s/installing-node-with-nvm.md
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.
@namezis
namezis / rssi.go
Created November 19, 2021 06:42 — forked from danyanya/rssi.go
golang client distance from rssi and mhz
package rssi
import (
"math"
)
const (
// from wiki original formula: https://en.wikipedia.org/wiki/Free-space_path_loss
fsplConstant = 27.55
)
@namezis
namezis / 00_ioctl_golang
Created August 14, 2021 09:56 — forked from tetsu-koba/00_ioctl_golang
Golang ioctl sample
Golang ioctl sample
@namezis
namezis / ANSI.md
Created December 24, 2020 10:54 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1b
  • Decimal: 27
@namezis
namezis / generate-dropbear-key
Created December 19, 2020 08:55 — forked from hongkongkiwi/generate-dropbear-key
Generate SSH Key in Dropbear
#!/bin/bash
KEY_DIR="/mnt/sda1/.ssh"
# Make directories
mkdir -p "$KEY_DIR"
# Generate an RSA key using dropbear
dropbearkey -t rsa -f "${KEY_DIR}/id_rsa"
@namezis
namezis / gist:fee0713d052f33f3e937d6d5046f13cc
Created November 24, 2020 11:38 — forked from fidgetting/gist:7257437
Simple C++ class that lets one spawn another process and then read from and write to its stdin and stdout on linux. The class declaration and template functions should be in a separate file.
/* local includes */
#include <process.hpp>
/* std includes */
#include <cstdlib>
#include <ext/stdio_filebuf.h>
#include <iostream>
#include <fstream>
#include <string>
@namezis
namezis / git-apply-patch.md
Created October 13, 2020 04:00 — forked from emmanueltissera/git-apply-patch.md
Generate a git patch for a specific commit

Creating the patch

git format-patch -1 <sha>
OR
git format-patch -1 HEAD

Applying the patch

git apply --stat file.patch # show stats.
git apply --check file.patch # check for error before applying

@namezis
namezis / egos_throttle.sh
Created August 24, 2020 20:39 — forked from TheOtherDave/egos_throttle.sh
Run cputhrottle for a list of applications in order to limit their CPU usage.
#!/bin/bash
# Run cputhrottle for a list of applications in order to limit their CPU usage.
# This script needs `pidof` and `cputhrottle` installed, which can be installed from homebrew.
# NOTE: This script was tested on MacOS only.
if [[ $EUID > 0 ]]; then
echo "Please run this script as root/sudo"
exit 1
fi
diff --git a/include/netutils/mqtt.h b/include/netutils/mqtt.h
new file mode 100644
index 00000000..b2077e67
--- /dev/null
+++ b/include/netutils/mqtt.h
@@ -0,0 +1,1509 @@
+#ifndef __MQTT_H__
+#define __MQTT_H__
+
+#include "mqtt_pal.h"
@namezis
namezis / README.md
Created December 10, 2019 08:37 — forked from plugnburn/README.md
NokiaTool - simple interface Bash script for MediaTek-based Nokia simple phones

NokiaTool: control MediaTek-based Nokia phones from your PC

Overview

NokiaTool is a simple Bash script (nokiatool.sh) that allows you to use an undocumented serial connection in USB-enabled MediaTek-based Nokia feature phones manufactured by Microsoft (even the most basic ones, like the new 105) in order to control them from your PC.

This project is an ongoing work and uses only some bits and pieces of information about the phone internals available to the public, so under any circumstances don't consider it stable or a replacement for official tools if any are present.