Original: http://www.shadowandy.net/2012/03/asus-rt-n66u-tomatousb-firmware-flashing-guide.htm
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| import re | |
| import distutils.sysconfig as sysconfig | |
| import os | |
| __doc__ = '''set-me-up. | |
| Usage: | |
| set-me-up <projectdir> | |
| ''' |
This file contains hidden or 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
| # YOU NEED TO INSERT YOUR APP KEY AND SECRET BELOW! | |
| # Go to dropbox.com/developers/apps to create an app. | |
| app_key = 'YOUR_APP_KEY' | |
| app_secret = 'YOUR_APP_SECRET' | |
| # access_type can be 'app_folder' or 'dropbox', depending on | |
| # how you registered your app. | |
| access_type = 'app_folder' |
This file contains hidden or 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
| def runserver(port=5000, profile_log=None): | |
| """Runs a development server.""" | |
| from gevent.wsgi import WSGIServer | |
| from werkzeug.serving import run_with_reloader | |
| from werkzeug.debug import DebuggedApplication | |
| from werkzeug.contrib.profiler import ProfilerMiddleware | |
| port = int(port) | |
| if profile_log: |
This file contains hidden or 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
| import os | |
| import sys | |
| import pickle | |
| import console | |
| # I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder | |
| sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')] | |
| import dropboxlogin # this code can be found here https://gist.github.com/4034526 | |
| STATE_FILE = '.dropbox_state' |
This file contains hidden or 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
| // This Arduino example demonstrates bidirectional operation of a | |
| // 28BYJ-48, which is readily available on eBay for $4.25 inc shipping, | |
| // using a ULN2003 interface board to drive the stepper. The 28BYJ-48 | |
| // motor is a 4-phase, 8-beat motor, geared down by a factor of 64. One | |
| // bipolar winding is on motor pins 1,3 and the other on motor pins 2,4. | |
| // Refer to the manufacturer's documentation of Changzhou Fulling | |
| // Motor Co., Ltd., among others. The step angle is 5.625/64 and the | |
| // operating Frequency is 100pps. Current draw is 92mA. | |
| // Vin w USB power is 4.5v too slow for testing use 5v pin. | |
| //#include <Narcoleptic.h> |
This file contains hidden or 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
| // Make our app module, its easier to do this in raw javascript | |
| // and then put the rest of our app content (controllers etc) | |
| // in their own coffeescript files. | |
| // | |
| // Your ng-app should include this module name, eg: <html ng-app="TodoApp"> | |
| angular.module('TodoApp', []); |
This file contains hidden or 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
| mjumbewu@mjumbewu-xps ~ | |
| $ uname -a | |
| Linux mjumbewu-xps 3.5.0-22-generic #34+kamal11~DellXPS-Ubuntu SMP Fri Jan 11 09:12:57 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux | |
| mjumbewu@mjumbewu-xps ~ | |
| $ xinput list-props 12 | |
| Device 'CyPS/2 Cypress Trackpad': | |
| Device Enabled (132): 1 | |
| Coordinate Transformation Matrix (134): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 | |
| Device Accel Profile (255): 1 |
This file contains hidden or 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
| license: gpl-3.0 |
This file contains hidden or 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
| def pprint_doc(doc, level=1): | |
| '''Pretty prints a `mongoengine.Document`.''' | |
| body = ['<', type(doc).__name__, ':'] | |
| # for field in sorted(doc._fields, key=lambda f: f.number): | |
| for key, field in doc._fields.iteritems(): | |
| value = doc[key] | |
| if value is not None: | |
| body.append('\n%s%s: %s' % (' '.join([' ' for idx in range(level)]), key, repr(value))) | |
| body.append('>') |