- Enable Firewall
- Enable FileVault
- Disable all sharing
0.- Install XCode Compiler
/** | |
* This is based on: http://docs.aws.amazon.com/lambda/latest/dg/walkthrough-s3-events-adminuser.html | |
*/ | |
// dependencies | |
var async = require('async'); | |
var AWS = require('aws-sdk'); | |
var gm = require('gm').subClass({ imageMagick: true }); // Enable ImageMagick integration. | |
var util = require('util'); | |
var MAX_WIDTH; |
class SampleFilter(filters.FilterSet): | |
start_date = django_filters.DateFilter(name="date", lookup_type='gte') | |
end_date = django_filters.DateFilter(name="date", lookup_type='lte') | |
# How to filter by a foreign key that uses slug as a lookup | |
foo = django_filters.ModelMultipleChoiceFilter( | |
queryset=MyModel.objects.all(), | |
to_field_name='slug', | |
conjoined=True, | |
) | |
class Meta: |
;; .emacs.d/init.el | |
;; =================================== | |
;; MELPA Package Support | |
;; =================================== | |
;; Enables basic packaging support | |
(require 'package) | |
;; Adds the Melpa archive to the list of available repositories | |
(add-to-list 'package-archives |
The public facing documentation for the IOTile Core Tools is https://coretools.readthedocs.io/en/latest/introduction.html, but things change a little when you have access to a real device.
With a BLED112 dongle, and access to the proper packages, you can communicate with a real device.
After installation, the iotile operations can be run from the OS command-line, or by using the IOTile Shell.
/* Assumes the following directory structure: | |
* ./images # With original images | |
* ./base # With the index.html, css, js to be used to create a base template | |
* # This directory containts its own gulpfile (maybe coming from a yeoman or similar) | |
* ./server # Actual Django project, with a templates subdirectory | |
*/ | |
var gulp = require('gulp'); | |
var chug = require( 'gulp-chug' ); | |
var awspublish = require('gulp-awspublish'); |
import argparse | |
import time | |
import sys | |
from iotile.core.hw import HardwareManager | |
def build_parser(): | |
parser = argparse.ArgumentParser(description="Print broadcast readings from a specific device") | |
parser.add_argument('-d', '--dev', type=lambda x: int(x, 0), help="Optional, the UUID of the device you want to see broadcasts from (0x21 for example)") | |
parser.add_argument('-i', '--interval', type=float, default=1.0, help="The minimum interval in seconds between two reported readings (only applies when -d is given), defaults to 1s") |
// Based on http://pythonhackers.com/p/fluent-ffmpeg/node-fluent-ffmpeg | |
// and https://trac.ffmpeg.org/wiki/Create%20a%20mosaic%20out%20of%20several%20input%20videos | |
// Usage: | |
// node ffmpeg-mosaic.js file1.mp2 file2.mp4 file3.mp4 file4.mp4 | |
// Generates out.mp4 | |
var ffmpeg = require('fluent-ffmpeg'); | |
var command = ffmpeg() |