Skip to content

Instantly share code, notes, and snippets.

View PhilCS's full-sized avatar

Philippe Carpentier-Savard PhilCS

View GitHub Profile
@lbussy
lbussy / README.md
Last active June 29, 2025 22:45
External Button Shutdown for Raspberry Pi

Shutdown Raspberry Pi with a Single Button

There are two methods:

  1. Scripted Method
  2. Boot Overlay Method (also below as "tl;dr")

tl;dr Version

Add the following to your /boot/config.txt and reboot:

@ExtremeGTX
ExtremeGTX / Ubuntu_AP.md
Last active August 13, 2025 09:01
Setup Ubuntu server as Access point

Introduction

This tutorial for setting up Ubuntu Server (RPi 3B) as Wifi access point

Overview:

The main steps can be listed as following:

  1. Install required packages
  2. Setup hostapd
  3. Setup DNSmasq
  4. Configure AP IP Address
@dronir
dronir / convert_bom.py
Last active April 15, 2021 22:35
Scripts to convert KiCad files for JLCPCB assembly service
# This converts a BOM file in CSV format, produced by KiCad Pcbnew,
# by selecting File / Fabrication Outputs / BOM File
# into the format expected by the JLCPCB manufacture service.
# At least in KiCad 5.1.4 the CSV output seems a bit broken in terms of column names,
# which is reflected in this code. If it changes in later KiCad versions, this script
# needs to change, too.
# Use this by running the command line: python convert_bom.py inputfile.csv outputfile.csv
# It will overwrite your output file without asking so be careful.
@EliaCereda
EliaCereda / NSImage+Python.swift
Created June 16, 2019 12:37
Convert NSImage to NumPy ndarray and viceversa
//
// NSImage+Python.swift
//
// Created by Elia Cereda on 03/06/2019.
// Copyright © 2019 Elia Cereda.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@stevecheckoway
stevecheckoway / notes.md
Created May 29, 2019 18:30
Installing Ghidra Server on Ubuntu 18.04.2 LTS

Installation on Ubuntu 18.04.2 LTS

  1. Install the jdk.

    $ sudo apt update
    $ sudo apt install default-jdk
    
  2. Create a new user.

@westphallm1
westphallm1 / Spinnaker_on_RPi_Ubuntu.md
Last active June 17, 2025 10:59
Installing the Spinnaker SDK on Ubuntu for Raspberry Pi

Raspberry Pi Ubuntu Spinnaker SDK Setup

These steps describe using an Ubuntu desktop environment to install Ubuntu and the Spinnaker Python interface on a Raspberry Pi 3 B+. Commands to be run on the desktop are prefaced with (desktop)$, and commands to be run on the Raspberry Pi are prefaced with (pi)$

  1. Flash the latest Ubuntu image (at the time of writing: 18.04) to an SD card and perform first-time setup by following these instructions. You will need an HDMI cable, a monitor, and a keyboard. The Raspberry Pi must also be connected to your local network via Ethernet.
@iwalpola
iwalpola / stm32_gpio_reg.md
Last active April 8, 2025 10:07
STM32 GPIO registers cheatsheet
@xcompass
xcompass / questrade_updater.js
Last active July 31, 2020 20:40
Questrade Updater
// ==UserScript==
// @name Questrade Updater
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Auto refresh Questrade trading UI
// @author Pan Luo
// @match https://my.questrade.com/Trading/*
// @updateURL https://gist.githubusercontent.com/xcompass/697fd581e5c39b5e6c54/raw/questrade_updater.js
// @grant none
// ==/UserScript==
@gbaman
gbaman / HowToOTG.md
Last active October 31, 2025 04:03
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

@andyyou
andyyou / gist:3052671
Created July 5, 2012 09:46
C# Controls abbreviation
btn Button chk CheckBox ckl CheckedListBox
cmb ComboBox dtp DateTimePicker lbl Label
llb LinkLabel lst ListBox lvw ListView
mtx MaskedTextBox cdr MonthCalendar icn NotifyIcon
nud NumeircUpDown pic PictureBox prg ProgressBar
rdo RadioButton rtx RichTextBox txt TextBox
tip ToolTip tvw TreeView wbs WebBrowser
容器
flp FlowLayoutPanel grp GroupBox pnl Panel