- probe device: Olimex ARM-USB-OCD-H
- target device: Raspberry Pi 2
- host machine: Ubuntu 15.04
openocd-0.9.0
as debugger host:- probe device driver:
libftd2xx1.1.12
- probe device driver:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Note: Doesn't work anymore (at least for Gnome 3.34, possibly later; see Python script instead) | |
# Usage: gnome-inhibit <command-line> | |
# Example: gnome-inhibit mpv video.mp4 | |
cookie=$(dbus-send \ | |
--session \ | |
--dest=org.freedesktop.ScreenSaver \ | |
--type=method_call \ | |
--print-reply=literal \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT License | |
// | |
// Copyright (c) 2016 stable|kernel | |
// | |
// 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 | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# DS4 report stuff | |
# | |
import struct | |
from sys import stdin, argv | |
import os | |
from io import FileIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set -e | |
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG | |
trap 'echo FAILED COMMAND: $previous_command' EXIT | |
#------------------------------------------------------------------------------------------- | |
# This script will download packages for, configure, build and install a GCC cross-compiler. | |
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running. | |
# If you get an error and need to resume the script from some point in the middle, | |
# just delete/comment the preceding lines before running it again. |
Work in progress, I'll write this up properly when I'm done.
Almost all credit goes to @maxogden for putting me on to this and pointing me in the right direction for each of these items.
Prerequisites:
- Raspberry Pi
- Kindle Paperwhite freed from its locked down state (jailbroken) http://www.mobileread.com/forums/showthread.php?t=198446
- You have to downgrade your Kindle to 5.3.1 to install the current jailbreak; that's just a matter of getting the old version image, putting it on your Kindle via USB and telling it to install "upgrade". Then you put in the Jailbreak files, load the ebook and break.
- Your kindle will be quick to detect an upgrade is available so it'll want to upgrade soon afterwards but the jailbreak will last but you have to reinstall the developer certificates so it's a bit of a pain but doable. Find all the instructions on the mobileread.com forums and wiki.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started POST "/tickets/1/comments" for 127.0.0.1 at 2012-04-03 12:16:25 -0600 | |
Processing by CommentsController#create as HTML | |
Parameters: {"utf8"=>"✓", "comment"=>{"text"=>"Is it out yet?"}, "tags"=>"", "commit"=>"Create Comment", "ticket_id"=>"1"} | |
[1m[36mState Load (0.0ms)[0m [1mSELECT "states".* FROM "states" [0m | |
[1m[35mUser Load (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 2 LIMIT 1 | |
[1m[36mTicket Load (0.0ms)[0m [1mSELECT "tickets".* FROM "tickets" WHERE "tickets"."id" = ? LIMIT 1[0m [["id", "1"]] | |
[1m[35mProject Load (0.0ms)[0m SELECT "projects".* FROM "projects" WHERE "projects"."id" = 1 LIMIT 1 | |
[1m[36mPermission Load (0.0ms)[0m [1mSELECT "permissions".* FROM "permissions" WHERE "permissions"."user_id" = 2[0m | |
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1 | |
[1m[36mTicket Load (0.0ms)[0m [1mSELECT "tickets".* FROM "tickets" WHERE "tickets"."id" = 1 LIMIT 1[0m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numpy import linspace, cos, pi, absolute | |
from numpy.fft import fft, fftfreq, fftshift | |
import matplotlib.pyplot as plt | |
# Sampling rate | |
fs = 64 # Hz | |
# Time is from 0 to 1 seconds, but leave off the endpoint, so | |
# that 1.0 seconds is the first sample of the *next* chunk | |
length = 1 # second |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple bluetooth scan with IOBluetooth (macruby) | |
framework 'appkit' | |
framework 'IOBluetooth' | |
# IOBluetoothInquiryDelegate | |
class EventHandler | |
def deviceInquiryStarted(sender) | |
puts "Searching for devices..." | |
end |
NewerOlder