Skip to content

Instantly share code, notes, and snippets.

@lucsmall
lucsmall / logic.gnuplot
Created May 17, 2012 11:40
GNUPlot file for showing data exported the Saleae Logic Analyser software
set terminal x11 size 1200,400
set size ratio 0.01
set key left
unset xtics
unset ytics
unset border
set multiplot layout 4,1
plot "69251.txt" using 1:2 title "69% 25.1" with lines linecolor -1
plot "70258.txt" using 1:2 title "70% 25.8" with lines linecolor 1
plot "71048.txt" using 1:2 title "71% 4.8" with lines linecolor 3
@lucsmall
lucsmall / transform.sh
Created May 17, 2012 12:10
Transform Saleae Logic exported CSV into a format suitable for GNUPLot
cut -d "," -f 2 logic_export.csv | cat -n > gnuplot_in.txt
@lucsmall
lucsmall / logic_export.csv
Created May 18, 2012 03:25
Extract from example exported CSV from Saleae Logic software
274682 1
274683 1
274684 1
274685 1
274686 1
274687 1
274688 1
274689 1
274690 1
274691 1
@lucsmall
lucsmall / gnuplot_in.txt
Created May 18, 2012 03:27
Example Saleae Logic data after transformation to suit GNUPlot
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
@lucsmall
lucsmall / gist:2760052
Created May 21, 2012 00:35
Invoking GNUPlot
gnuplot
# ... wait for gnuplot to load ...
load "logic.gnuplot"
@lucsmall
lucsmall / interfaces
Created September 20, 2012 06:38
Ralink RT5370 Configuration - adding network interface in /etc/network/interfaces
auto wlan0
iface wlan0 inet dhcp
wpa-ssid <Your Access Point Name aka SSID>
wpa-psk <Your WPA Password>
@lucsmall
lucsmall / lsusb
Created September 20, 2012 06:42
Ralink RT5370 Configuration - Output of lsusb and lsmod
# lsusb | grep Ralink
Bus 001 Device 007: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
# lsmod | grep rt2
rt2800usb 12069 0
rt2800lib 47242 1 rt2800usb
rt2x00usb 11075 1 rt2800usb
rt2x00lib 41057 3 rt2x00usb,rt2800lib,rt2800usb
mac80211 236178 3 rt2x00lib,rt2x00usb,rt2800lib
cfg80211 171957 2 mac80211,rt2x00lib
@lucsmall
lucsmall / ifup
Created September 20, 2012 06:49
Ralink RT5370 Configuration - Bringing the network interface up
# sudo ifup wlan0
# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr aa:bb:cc:dd:ee:ff
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16143 errors:0 dropped:0 overruns:0 frame:0
TX packets:1982 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2970692 (2.8 MiB) TX bytes:121265 (118.4 KiB)
@lucsmall
lucsmall / raspi.sh
Created September 21, 2012 04:20
Commands to measure Raspberry Pi temperature and CPU scaling frequency
# Measure current temp
/opt/vc/bin/vcgencmd measure_temp
# Read CPU scaling frequency
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "UWS-Parramatta"
},
"geometry": {
"type": "Polygon",