Skip to content

Instantly share code, notes, and snippets.

View Ravenstine's full-sized avatar

Ten Bitcomb Ravenstine

View GitHub Profile
@jwbee
jwbee / readme.md
Last active October 15, 2022 03:44
Help me identify possible tracking device found in my car

Help me identify possible tracking device found in my car

TL;DR

I found a non-OEM electronic gadget in my car. It is wired into the ignition, and contains a 435.10 MHz radio reciever, a microcontroller, and two relays. I suspect it might be a device that allows third parties to unlock the doors and start the car with a radio.

Details

I was driving my 2020 Honda Insight EX when it started to make the annoying sound of an electromechanical relay rapidly switching on and off. When I got home I looked under the dash and straight away I could see someone other than Honda had been in here. The first thing I saw was this surface-mounted switch that doesn't belong there.

@quantra-go-algo
quantra-go-algo / Python code for Sharpe Ratio.py
Last active March 5, 2024 11:59
Sharpe Ratio - Sharpe Ratio in Python
# Load the required modules and packages
import numpy as np
import pandas as pd
import yfinance as yf
# Pull NIFTY data from Yahoo finance
NIFTY = yf.download('^NSEI','2012-01-01', '2016-01-01')
# Compute the logarithmic returns using the closing price
returns = np.log(NIFTY['Close'] / NIFTY['Close'].shift(1))
@raposatech
raposatech / finance_helper_funcs.py
Created February 18, 2022 16:01
Helper functions to calculate backtest returns and strategy stats.
# A few helper functions
def calcReturns(df):
# Helper function to avoid repeating too much code
df['returns'] = df['Close'] / df['Close'].shift(1)
df['log_returns'] = np.log(df['returns'])
df['strat_returns'] = df['position'].shift(1) * df['returns']
df['strat_log_returns'] = df['position'].shift(1) * \
df['log_returns']
df['cum_returns'] = np.exp(df['log_returns'].cumsum()) - 1
df['strat_cum_returns'] = np.exp(
@PraneshASP
PraneshASP / createWallet.js
Last active March 12, 2024 11:51
Create a bitcoin wallet with this simple script.
//Import dependencies
const bip32 = require('bip32')
const bip39 = require('bip39')
const bitcoin = require('bitcoinjs-lib')
//Define the network
const network = bitcoin.networks.bitcoin //use networks.testnet for testnet
// Derivation path
const path = `m/49'/0'/0'/0` // Use m/49'/1'/0'/0 for testnet
@cibernox
cibernox / post-draft.md
Created January 15, 2021 21:09
Alexa apps in JS

Voice assistants are becoming more and more popular by the day.

It started in our phones, but now they've made it into the speakers of our homes and cars, ready to answer our questions and follow our commands.

For their users, voice assistants provide a convenient hands-free way of performing certain action like playing a song, checking the traffic reports, setting reminders or turning lights on and off.

For companies this convenience also provides a novel way for generating engagement, sometimes more so than webs or phone apps themselves.

@FreddieOliveira
FreddieOliveira / docker.md
Last active April 25, 2024 12:24
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@probonopd
probonopd / Wayland.md
Last active April 24, 2024 20:06
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@dehanjl
dehanjl / HM-10_Commander.ino
Created September 22, 2020 13:50
Change AT settings of the HM-10
// Dehan Lamprecht, 2020
// Allows changing the settings of the HM-10 (or MLT-BT05) module
// Adapted from http://www.martyncurrey.com/hm-10-bluetooth-4ble-modules/
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(2, 3); // RX | TX
char c=' ';
boolean NL = true;
@atoponce
atoponce / instructions.md
Last active November 1, 2023 20:17
Tutorial for generating Bitcoin wallet mnemonic seeds by hand (almost)

Creating a BIP39 mnemonic 100% by hand (almost)

This document shows how we can create Bitcoin wallet mnemonic seeds by hand in a provably secure way. It follows the BIP-39 specification. The steps are straight forward, and we'll go into each of them in detail with this doc.

The steps are as follows:

  • Generate cryptographically secure bits
  • Divide into 11-bit bytes
@raveenb
raveenb / ssh_into_android.md
Last active April 18, 2024 06:27
SSH into Android

Connecting to an Android device over SSH

Initial Setup

Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it to get the latest version, The APK can be downloaded from https://apkpure.com/termux/com.termux/ Install the APK using by running

adb install ~/Downloads/Termux_v0.73_apkpure.com.apk