Skip to content

Instantly share code, notes, and snippets.

@gbaman
gbaman / HowToOTG.md
Last active May 2, 2024 01:27
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@Pulimet
Pulimet / AdbCommands
Last active May 2, 2024 01:24
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@lmullen
lmullen / gist:3767386
Created September 22, 2012 18:50
Make all markdown files in directory into PDFs
# Produce PDFs from all Markdown files in a directory
# Lincoln Mullen | http://lincolnmullen.com | lincoln@lincolnmullen.com
# List files to be made by finding all *.md files and appending .pdf
PDFS := $(patsubst %.md,%.md.pdf,$(wildcard *.md))
# The all rule makes all the PDF files listed
all : $(PDFS)
# This generic rule accepts PDF targets with corresponding Markdown
@janakamarasena
janakamarasena / secret_gen.rb
Last active May 2, 2024 01:21
Sign In with Apple Client Secret Generator
require "jwt"
key_file = "Path to the private key"
team_id = "Your Team ID"
client_id = "The Service ID of the service you created"
key_id = "The Key ID of the private key"
validity_period = 180 # In days. Max 180 (6 months) according to Apple docs.
private_key = OpenSSL::PKey::EC.new IO.read key_file
@bogdanRada
bogdanRada / customize-mx-master-ubuntu.md
Created April 17, 2020 09:01 — forked from vukhanhtruong/customize-mx-master-ubuntu.md
Custom keymap for Logitech MX Master 2S mouse on Ubuntu

First, install Solaar to see the battery level on the taskbar

sudo apt-get install solaar

To remap the keys, install

sudo apt-get install xbindkeys xautomation
@chrisswanda
chrisswanda / WireGuard_Setup.txt
Last active May 2, 2024 01:13
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@pablotolentino
pablotolentino / Visual Studio 2022 Product Key
Created November 20, 2021 20:41
Visual Studio 2022 Enterprise Product key
Visual Studio 2022
Enterprise :
VHF9H-NXBBB-638P6-6JHCY-88JWH
Professional:
TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
@0xjac
0xjac / private_fork.md
Last active May 2, 2024 01:10
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@codyc1515
codyc1515 / Goodnature A24 Rat & Stoat Trap - Chirp BLE Protocol.md
Last active May 2, 2024 01:07
Goodnature A24 Rat & Stoat Trap - Chirp BLE Protocol

Introduction

Goodnature is a New Zealand based manufacturer of humane traps. Their model A24 trap targets Rat & Stoats. The device is triggered when a pest brushes past an activation pin. This causes the striker to activate instantly using the power of a small, replacable CO2 gas canister.

The device is also available with an optional visual counter or a Bluetooth Low Energy (BLE) enabled device and companion app, named Chirp. This gist aims to document some of the more technical details of the Goodnature A24 Chirp device (such as the BLE Services and Characteristics) which are not immediately clear from the support website.

How it works

  • The app requires "Always"-On location permission to detect when the user is near the trap. When near the trap, the app will then listen for BLE beacons from the Chirp.
  • Only one device using the app can connect to the Chirp at any time. When the device disconnects from the Chirp, it goes back to "sleep" again and must be "woken".
  • Because the Chirp does not have Wi
COBOL TUTORIAL
INSTALL ON WINDOWS : https://www.it-cooking.com/projects/how-to-install-gnucobol-for-cygwin/
COBOL (Common Business Oriented Language) is the most rigidly structured programming language. It focuses on data oriented business applications. And many people think it is pointless to learn, but those people are not aware that over 80% of all financial transactions in the US and the vast majority of US government systems depend on COBOL.
[SWITCH TO CODE]
COBOL was created to match natural language. The COBOL program is made up of paragraphs, sections, sentences, verbs and other common speaking language terms.
>>SOURCE FORMAT FREE