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
var assert = require('assert'); | |
var SerialPort = require('serialport').SerialPort; | |
var device = require('./config.json')['device']; | |
describe('opening and closing a serial port', function() { | |
var serialport; | |
this.timeout(10000); | |
before(function() { |
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
if (process.argv.length < 3) { | |
console.log('Usage: node run.js PORT [ID1] [ID2]'); | |
return; | |
} | |
var device = process.argv[2]; | |
var SerialPort = require('serialport').SerialPort; | |
var bluetoothCubelet = new SerialPort(device, { baudrate: 38400 }); | |
var cubelets = require('cubelets'); |
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
<pre id="credentials"></pre> | |
<button onClick="javascript:sendRequest()">Send Request</button> | |
<script> | |
function getEmberSessionCredentials() { | |
var data = localStorage['ember_simple_auth:session'] | |
if (!data) { return null } | |
var session = JSON.parse(data) | |
if (!session) { return null } |
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
// Siren: a hypermedia specification for representing entities | |
// https://github.com/kevinswiber/siren | |
protocol SirenRoot: SirenEntity {} | |
protocol SirenEntity { | |
var classNames: [String]? { get } | |
var properties: [String: AnyObject]? { get } | |
var entities: [SirenSubEntityType]? { get } | |
var links: [SirenLink]? { get } |
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
# Example Fastfile using the `publish_pact_to_broker` action. | |
# | |
# NOTE: Since Fastlane uses dotenv, create a `.env` file in the fastlane | |
# directory to set `PACT_BROKER_USERNAME` and `PACT_BROKER_PASSWORD` and | |
# keep it secret by adding it to .gitignore. | |
default_platform(:ios) | |
xcodeproj = "MyProject.xcodeproj" | |
slack_url = "https://hooks.slack.com/services/MY/SLACK/WEBHOOK" |
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
import UIKit | |
class BusyController<V: UIView> { | |
let view: V | |
var busyView: UIView? = nil | |
var busyText: String = "Loading...".localized() | |
init(view: V) { |
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
APP_NAME="YOUR_APP_NAME_HERE" | |
SRC=./Design/AppIcon.png | |
DST=./$APP_NAME/Assets.xcassets/AppIcon.appiconset | |
convert $SRC -resize 1024x1024 "$DST/AppIcon1024x1024.png" | |
convert $SRC -resize 2048x2048 "$DST/AppIcon2048x2048.png" | |
convert $SRC -resize 29x29 "$DST/AppIcon29x29.png" | |
convert $SRC -resize 58x58 "$DST/AppIcon29x29@2x.png" | |
convert $SRC -resize 87x87 "$DST/AppIcon29x29@3x.png" | |
convert $SRC -resize 80x80 "$DST/AppIcon40x40@2x.png" |
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
#include <FastLED.h> | |
#define LED_PIN 7 | |
#define NUM_LEDS 240 | |
CRGB leds[NUM_LEDS]; | |
int offset = 0; | |
void setup() { | |
FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS); |
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/sh | |
# Copyright 2019 the Deno authors. All rights reserved. MIT license. | |
# Copyright 2020 justjavac. All rights reserved. MIT license. | |
# TODO(everyone): Keep this script simple and easily auditable. | |
set -e | |
# if [ "$(uname -m)" != "x86_64" ]; then | |
# echo "Error: Unsupported architecture $(uname -m). Only x64 binaries are available." 1>&2 | |
# exit 1 |