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
## within current branch, squashes all commits that are ahead of master down into one | |
## useful if you merged with upstream in the middle of your commits (rebase could get very ugly if this is the case) | |
## commit any working changes on branch "mybranchname", then... | |
git checkout master | |
git checkout -b mybranchname_temp | |
git merge --squash mybranchname | |
git commit -am "Message describing all squashed commits" | |
git branch -m mybranchname mybranchname_unsquashed | |
git branch -m mybranchname |
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
[ | |
{ | |
"userName": "ONSdigital", | |
"repo": "eq-address-lookup-api" | |
},{ | |
"userName": "ONSdigital", | |
"repo": "eq-census-schemas" | |
},{ | |
"userName": "ONSdigital", | |
"repo": "eq-compose" |
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 json | |
import click | |
from graphviz import Digraph | |
from collections import OrderedDict | |
class Graph: | |
def __init__(self, filename): | |
with open(filename, 'r') as f: | |
self.input = json.loads(f.read()) |
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
var fs = require("fs"); | |
var http = require("http"); | |
var path = require("path"); | |
try { | |
var SDP = require("./sdp"); | |
} catch (e) { | |
console.error("+-------------------------WARNING-------------------------+"); | |
console.error("| sdp.js not found, will not transform signaling messages |"); | |
console.error("+---------------------------------------------------------+"); | |
} |
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(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.mqtt = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
(function (process,global){ | |
'use strict'; | |
/** | |
* Module dependencies | |
*/ | |
/*global setImmediate:true*/ | |
var events = require('events'), | |
Store = require('./store'), | |
eos = require |
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(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.mqtt = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
(function (process,global){ | |
'use strict'; | |
/** | |
* Module dependencies | |
*/ | |
/*global setImmediate:true*/ | |
var events = require('events'), | |
Store = require('./store'), | |
eos = require |
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
wifi.setmode(wifi.STATION) | |
wifi.sta.config("YOUR SSID", "PASSWORD") | |
gpio.mode(4, gpio.OUTPUT) | |
tmr.alarm(0, 5000, 0, function() | |
m = mqtt.Client("ESP8266"..node.chipid() , 120) | |
m:connect("YOUR IP ADDRESS", 1883, 0, function(conn) | |
print("Connected to MQTT broker") | |
m:subscribe("esp_led", 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
/* main.c -- MQTT client example | |
* | |
* Copyright (c) 2014-2015, Tuan PM <tuanpm at live dot com> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, | |
* this list of conditions and the following disclaimer. |
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
int runSingleSlaveProcess() { | |
ACKResponse_t resp = {0,0,0,{0},0}; | |
int slaveTarget = 100; | |
SuperSerial.pollUntilComplete(&resp, SLAVE_ID, 'A', 2, &slaveTarget); | |
if (resp.packetType != PACKET_NONE) { | |
Serial.print("Slave returned with data: "); |
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 <Arduino.h> | |
#include <stdio.h> | |
#include <SuperSerial.h> | |
//This is around the maximum that the MAX489 chip can support | |
//since it has slew rate limiting | |
#define BAUD_RATE 100000 | |
#define MAX489_RE 13 |
NewerOlder