Skip to content

Instantly share code, notes, and snippets.

View AKAMEDIASYSTEM's full-sized avatar

AKA AKAMEDIASYSTEM

View GitHub Profile
@nebadon2025
nebadon2025 / gist:3143d837350ab443482b0f5a6faccd6b
Last active May 11, 2024 07:03
Full Screen Youtube Autoplay URL format
https://www.youtube.com/embed/HH0zOJVOzxs?rel=0&autoplay=1;fs=0;autohide=0;hd=0;mute=1;

Interactive Machine Learning

Taught by Brad Knox at the MIT Media Lab in 2014. Course website. Lecture and visiting speaker notes.

@gbaman
gbaman / HowToOTGFast.md
Last active May 14, 2024 10:26
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@ratopi
ratopi / howto-rpi2.txt
Last active April 27, 2022 01:08
CouchDB on Raspberry PI
From: http://raspberryperl.com/CouchDB/installCouchDB-1.6.1-on-Pi-2-jessie.txt
================================================================================
# Install CouchDB Database on Pi-2 Running Raspbian Jessie
# These instructions are based on those found on this web page:
( http://jeeonthepi.blogspot.com/2015/09/installing-couchdb-161-on-raspberry-pi.html )
==========================================================================================
##########################################################################################
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
"FulfillmentCenter", "Location", "Country", "SquareFeet", "YearOpened", "Description of Operation"
"LTN1", "Ridgmont, Marston Gate , Bedfordshire, Milton Keynes, United Kingdom, MK43 0ZA", "", "550,000", "1998", "Originally a 220,000 sq. ft. fulfillment center"
"CWL1", "Ffordd Amazon, Crymlyn Burrows, Jersey Marine, Swansea, Wales, United Kingdom, SA1 8QX ", "", "800,000", "April2008", " "
"EDI4", "Amazon Way, Dunfermline, Fife, Scotland, United Kingdom, KY11 8ST ", "", "1,000,000", "November2011", "Current facility replaced a smaller fulfillment center in Glenrothes which opened in November, 2005 and closed in November, 2011."
"GLA1", "2 Cloch Road, Faulds Park, Gourock, Inverclyde, Scotland, United Kingdom, PA19 1BQ", "", "300,000", "July 2004", " "
"LBA1", "Firstpoint Business Park, Balby Carr Bank, Doncaster, South Yorkshire, United Kingdom, DN4 8DP", "", "412,000", "December2010", ""
"LBA2", "Firstpoint Business Park, Water Vole Way, Doncaster, South Yorkshire, United Kingdom", "", "250,000", "October20
FulfillmentCenter Location Country SquareFeet YearOpened Description of Operation
PHX3 6835 West Buckeye Road, Phoenix, Arizona, 85043 1,000,000 September2007 Large Sortable Fulfillment CenterOriginally opened at 605,000 Sq. Ft. Expanded by 400,000 Sq. Ft.  in Dec. 2011
PHX5 16920 W. Commerce Dr. , Goodyear, Arizona, 85338-3620 1,200,000 June2008 Non-sortable Fulfillment CenterOriginally opened at 800,000 Sq. Ft. Expanded to 1.2 Million Sq. Ft + a 230,000 sq ft mezzanine in 2011.
PHX6TFC1 4750 & 5050 West Mohave Street, Phoenix, Arizona, 85043-4428 1,207,000 October 2010 Large Sortable Fulfillment Center in one half of the buildingSmall Sortable Fulfillment Center in the other half
PHX7 800 N. 75th Ave, Phoenix, Arizona, 85043-3101 1,200,000 September2011 Small Sortable and Non Sortable Fulfillment Center
UAZ1 Phoenix, Arizona, 85001   2015 Prime Now Hub
ONT2 1910 E. Central Ave., Southgate Building 3, San Bernardino, California, 92408-0123 951,700 October 2012 Small Sortable
@drmalex07
drmalex07 / README-oneshot-systemd-service.md
Last active May 15, 2024 10:52
An example with an oneshot service on systemd. #systemd #systemd.service #oneshot

README

Services declared as oneshot are expected to take some action and exit immediatelly (thus, they are not really services, no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.

Let's create a example foo service that when started creates a file, and when stopped it deletes it.

Define setup/teardown actions

Create executable file /opt/foo/setup-foo.sh:

@gbaman
gbaman / HowToOTG.md
Last active June 9, 2024 13:57
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

@atduskgreg
atduskgreg / PWindow.pde
Last active November 21, 2015 19:20
Example of creating a Processing sketch with multiple windows. NOTE: this doesn't work in Processing 3.0. See the Processing 3.0 version here: https://gist.github.com/atduskgreg/666e46c8408e2a33b09a
class PWindow extends Frame {
PWindowApp app;
PWindow(int x, int y, int w, int h) {
setBounds(x,y,w,h);
app = new PWindowApp();
app.setParent(this);
add(app);
app.init();
show();