Skip to content

Instantly share code, notes, and snippets.

View featherbear's full-sized avatar
🙏
I might use nano, but does YOUR code work?

Andrew Wong featherbear

🙏
I might use nano, but does YOUR code work?
View GitHub Profile
@featherbear
featherbear / GetNordVPNWireGuardDetails.md
Created October 31, 2022 14:22 — forked from bluewalk/GetNordVPNWireGuardDetails.md
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

@featherbear
featherbear / _readme.md
Created August 28, 2022 15:17 — forked from stecman/_readme.md
Brother P-Touch PT-P300BT bluetooth driver python

Controlling the Brother P-Touch Cube label maker from a computer

The Brother PTP300BT label maker is intended to be controlled using the official Brother P-Touch Design & Print iOS/Android app. The app has arbitrary limits on what you can print (1 text object and up to 3 preset icons), so I thought it would be a fun challenge to reverse engineer the protocol to print whatever I wanted.

Python code at the bottom if you want to skip the fine details.

Process

Intitially I had a quick peek at the Android APK to see if there was any useful information inside. The code that handles the communication with the printer in Print&Design turned out to be a native library, but the app clearly prepares a bitmap image and passes it to this native library for printing. Bitmaps are definitely something we can work with.

@featherbear
featherbear / questions.md
Created April 1, 2022 04:15
CISSP Sample Questions

Question 1

You are a security consultant. A large enterprise customer hires you to ensure that their security operations are following industry standard control frameworks. For this project, the customer wants you to focus on technology solutions that will discourage malicious activities. Which type of control framework should you focus on?

[ ] Preventative
[ ] Deterrent
[ ] Detective
[ ] Corrective
[ ] Assessment

@featherbear
featherbear / HelloWorld Example in Quartus.md
Created March 5, 2022 06:33 — forked from peach-e/HelloWorld Example in Quartus.md
Quick tutorial to get RZ-EasyFPGA from AliExpress going with Quartus

Using

  • FPGA Development Board: RZ-EasyFPGA A2.2 from AliExpress, featuring the Altera Cyclone IV.
  • OS: Ubuntu 18.04 LTS (bionic)

Quartus Installation

  1. Get the Quartus Lite installer, ModelSim installer (optional), and the Cyclone IV development Package from the Altera website.
  2. Install Quartus. Root not required
    • Command:
@featherbear
featherbear / bunyan_global.ts
Last active April 23, 2022 11:09
Bunyan global import
declare global {
var logger: bunyan
}
import * as bunyan from 'bunyan'
globalThis.logger = bunyan.createLogger({
name: "LOGGER"
})
@featherbear
featherbear / gist:131edd3a70b6bb89b6573becb4607695
Last active June 24, 2021 14:08
Eternal Terminal manual build
# Build Server
LIB_DIR=~/.opt/lib
BIN_DIR=~/.opt/bin
INCLUDE_DIR=~/.opt/include
cmake ../ -DProtobuf_INCLUDE_DIR=$INCLUDE_DIR/ -DProtobuf_PROTOC_LIBRARIES=$LIB_DIR/ -DProtobuf_PROTOC_EXECUTABLE=$BIN_DIR/protoc -Dsodium_INCLUDE_DIR=$INCLUDE_DIR -Dsodium_LIBRARY_RELEASE=$LIB_DIR/libsodium.a -Dsodium_LIBRARY_DEBUG=true -DUTEMPTER_INCLUDE_DIR=$INCLUDE_DIR -DProtobuf_LITE_LIBRARY=$LIB_DIR/libprotobuf-lite.so -DUTEMPTER_LIBRARIES=$LIB_DIR/libutempter.so -DCMAKE_INSTALL_PREFIX=$HOME/.opt
# Server
etserver --daemon --pidfile ~/.etserver.pid
@featherbear
featherbear / gist:737cf59ba9f6fbbba0e0fb224a412dc2
Last active May 9, 2021 10:25
AliExpress GST Modifier (Australia)
// ==UserScript==
// @name GST in Australia
// @namespace http://tampermonkey.net/aliexpress-gst
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.aliexpress.com/*
// @icon https://www.google.com/s2/favicons?domain=aliexpress.com
// @grant none
// ==/UserScript==
@featherbear
featherbear / ydl.bat
Created February 17, 2021 12:16
youtube-dl script
@echo off
title youtube-dl %*
cd /d %USERPROFILE%\Downloads
youtube-dl --embed-thumbnail --extract-audio --audio-format mp3 -o "%%(title)s.%%(ext)s" %*
life360_username="---"
life360_password="---"
import requests
urlPrefix = "https://api.life360.com/v3/"
print("Authorising...")
auth = requests.post(urlPrefix + "oauth2/token.json",headers=dict(Authorization="Basic cFJFcXVnYWJSZXRyZTRFc3RldGhlcnVmcmVQdW1hbUV4dWNyRUh1YzptM2ZydXBSZXRSZXN3ZXJFQ2hBUHJFOTZxYWtFZHI0Vg=="), data=dict(grant_type="password",username=life360_username,password=life360_password))
assert auth.status_code ==200
@featherbear
featherbear / download.sh
Created October 26, 2020 13:22
Download Hugo version X
#!/bin/bash
pushd /tmp/ > /dev/null
curl -sL https://github.com/gohugoio/hugo/releases/download/v$1/hugo_$1_Linux-64bit.tar.gz | tar -zxf -
chmod +x hugo
mv hugo "hugo-$1"
popd > /dev/null