Skip to content

Instantly share code, notes, and snippets.

View gyaresu's full-sized avatar

Gareth gyaresu

View GitHub Profile
$ 83 32 0A 00 E6 18 46 70 -> ?
$ 83 33 0A 80 01 70 40 12 -> ?
$ 83 33 0B 00 73 E6 25 0D -> ?
$ 83 33 0B 80 EF 25 E0 24 -> ?
$ 83 32 0C 00 60 A8 40 B8 -> ?
$ 83 33 0C 80 80 D2 AF 1A -> ?
$ 83 33 0D 00 22 EF 12 03 -> ?
$ 83 33 0D 80 10 67 78 58 -> ?
$ 83 32 0E 00 00 F5 83 E4 -> ?
$ 83 33 0E 80 03 48 EE F0 -> ?
@gyaresu
gyaresu / HowToOTG.md
Created November 25, 2016 19:49 — forked from gbaman/HowToOTG.md
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

#!/bin/bash
cat $1 | grep IRA >> $1_positions.csv
sed -i -e 's/^.\+sat:/sat:/' -e 's/\( RAI\:.\+\)\|\(sat:\)\|\(beam:\)\|\(pos=(\)\|\()\)\|\(alt=\)\|\(+\)//g' -e 's%/%;%' -e 's/ /;/g' -e '/^00;00/d' -e '1 i\satellite;beam;latitude;longitude;altitude' $1_positions.csv
awk -F ';' '($5<=100){print}' $1_positions.csv >> $1_positions_spotbeams.csv
awk -F ';' '($5>100){print}' $1_positions.csv >> $1_positions_satellites.csv
alias.lg=log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
λ python
Python 2.7.10 (default, Jul 30 2016, 18:31:42)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/Users/gyaresu/Library/Python/2.7/lib/python/site-packages/render-0.0.4-py2.7.egg', '/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.
In [2]: print(sys.path)
['', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin', '/Users/gyaresu/Library/Python/2.7/lib/python/site-packages/render-0.0.4-py2.7.egg', '/opt/local/lib/python2.7/site-packages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/readline', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/User
λ sudo port -v selfupdate
---> Updating MacPorts base sources using rsync
Willkommen auf dem RSYNC-server auf ftp.fau.de.
Nicht all unsere Mirror sind per rsync verfuegbar.
Welcome to the RSYNC daemon on ftp.fau.de.
Not all of our mirrors are available through rsync.
λ sudo port install qt5
---> Computing dependencies for qt5
---> Dependencies to be installed: qt5-qtbase qt5-qtcanvas3d qt5-qtdeclarative qt5-qtxmlpatterns qt5-qtconnectivity qt5-qtenginio qt5-qtgraphicaleffects qt5-qtimageformats qt5-qtlocation qt5-qtquickcontrols qt5-qtserialport qt5-qtmacextras qt5-qtmultimedia qt5-qtsensors qt5-qtsvg qt5-qttools qt5-qttranslations qt5-qtwebchannel qt5-qtwebsockets qt5-sqlite-plugin
---> Fetching archive for qt5-qtbase
---> Attempting to fetch qt5-qtbase-5.6.1_0.darwin_16.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/qt5-qtbase
---> Attempting to fetch qt5-qtbase-5.6.1_0.darwin_16.x86_64.tbz2 from https://packages.macports.org/qt5-qtbase
---> Attempting to fetch qt5-qtbase-5.6.1_0.darwin_16.x86_64.tbz2 from http://lil.fr.packages.macports.org/qt5-qtbase
---> Fetching distfiles for qt5-qtbase
Warning: OS X subsequent to 10.10 (Yosemite) is not a Reference Configuration for Qt.
Warning: See http://doc.qt.io/qt-5/supported-platforms.html#refer
λ ls -al /usr/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/aqua/qt5/files
total 144
drwxr-xr-x 19 root wheel 646 15 Jun 08:01 .
drwxr-xr-x 4 root wheel 136 29 Sep 15:59 ..
-rw-r--r-- 1 root wheel 1416 5 May 06:00 patch-add_sdk.diff
-rw-r--r-- 1 root wheel 620 14 Jun 03:30 patch-configure.diff
-rw-r--r-- 1 root wheel 1251 14 Jun 03:30 patch-fontconfig.diff
-rw-r--r-- 1 root wheel 1355 5 May 06:00 patch-icu.diff
-rw-r--r-- 1 root wheel 753 14 Jun 03:30 patch-install_examples.diff
-rw-r--r-- 1 root wheel 833 13 Nov 2015 patch-machtest.diff
@gyaresu
gyaresu / gist:3deb611a8c6861db5f3980828e5727a4
Last active September 22, 2016 21:41
gr-iridium segfault
gyaresu on zaphod in ~/programming/gr-iridium(8d22h50m|master*)
λ iridium-extractor -D 4 examples/hackrf.conf | grep "A:OK" > output.bits
gr-osmosdr v0.1.x-xxx-xunknown (0.1.5git) gnuradio 3.7.10.1
built-in source types: file fcd rtl rtl_tcp uhd sdrplay hackrf bladerf rfspace airspy soapy
get_devices started
Device count: 0
get_devices end
Using HackRF One with firmware 2015.07.2
(RF) Gain: 14.0 (Requested 10)
BB Gain: 20.0 (Requested 20)