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
// BluetoothLowEnergy.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#pragma warning (disable: 4068) | |
#include <windows.h> | |
#include <stdio.h> | |
#include <tchar.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
#include <asf.h> | |
#include <avr/io.h> | |
#include <avr/wdt.h> | |
#include <stdint.h> | |
#define PIN_SET_OUTPUT(ddr, id) ddr |= _BV(id) | |
#define PIN_SET_INPUT(ddr, id) ddr &= ~_BV(id) | |
#define PIN_SET_HIGH(port, id) port |= _BV(id) | |
#define PIN_SET_LOW(port, id) port &= ~_BV(id) | |
#define PIN_IS_HIGH(pins, id) bit_is_set(pins, id) |
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
#include <asf.h> | |
#include <avr/io.h> | |
#include <avr/wdt.h> | |
#include <stdint.h> | |
#define PIN_SET_OUTPUT(ddr, id) ddr |= _BV(id) | |
#define PIN_SET_INPUT(ddr, id) ddr &= ~_BV(id) | |
#define PIN_SET_HIGH(port, id) port |= _BV(id) | |
#define PIN_SET_LOW(port, id) port &= ~_BV(id) | |
#define PIN_IS_HIGH(pins, id) bit_is_set(pins, id) |
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
function choices(n) { | |
var map = {} | |
var rand = function (n) { | |
return Math.floor(n * Math.random()) | |
} | |
var stride = (n / 2) | |
var i = rand(n) | |
var max = 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
<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 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
// 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 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
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/[email protected]" | |
convert $SRC -resize 87x87 "$DST/[email protected]" | |
convert $SRC -resize 80x80 "$DST/[email protected]" |
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
# 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 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 UIKit | |
class BusyController<V: UIView> { | |
let view: V | |
var busyView: UIView? = nil | |
var busyText: String = "Loading...".localized() | |
init(view: V) { |