Skip to content

Instantly share code, notes, and snippets.

@switchtrue
switchtrue / Reposit Market API - API Keys.md
Created January 31, 2018 05:44
Reposit Market API - API Keys

Reposit Power Market API - API Keys

Reposit Power offer the ability to generate and use API Keys in favour of username/password when using the Market API. These API keys a suited for use when using the Market API as they have an indefinate expiry ensuring you do not have to regularly re-authenticate with the API - as such these keys must be securely stored. API Keys may also whitelist IP addresses that they are valid to be used from therefore providing a second factor of authentication.

Creating a Key

API keys for the Reposit Market API can be generated by first logging in to Reposit Fleet. Once you ahve logged in click your username at the top right and then select "User Settings"

@switchtrue
switchtrue / nodemuc.md
Last active January 6, 2018 06:09
Notes on flashing MicroPython on NodeMCU from MacOS

NodeMCU mode: Keyes NodeMCU OS: Mac OS X (macOS)

Install a serial driver for the NodeMCU from: http://www.wch.cn/download/CH341SER_MAC_ZIP.html

Plugin the NodeMCU and see if you can see it at /dev/tty.wchusbserialfd120 NOTE: If you can't find it at the above locations try ls /dev/cu.* and see what else is available.

OSX Sierra Important Note: After upgrading to Sierra plugging in my NodeMUC I kept getting Kernel panics and the laptop would restart. To fix this I uninstalled the original drivers with the following commands, restarted and then re-installed from the link above.

import React from 'react';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import {connect} from 'react-redux';
import * as actionCreators from '../actioncreators/Room';
export const Room = React.createClass({
mixins: [PureRenderMixin],
componentWillMount: function() {
this.props.enterRoom(this.props.params.id);
},
@switchtrue
switchtrue / oracle_1Z0-061_notes.md
Last active September 29, 2023 13:07
Notes for taking the 1Z0-061 Oracle Exam - Oracle Database 12c: SQL Fundamentals

Introduction

I have compiled these notes whilst revising for the Oracle 1Z0-061 Exam - Oracle Database 12c: SQL Fundamentals. They should also be relevant to the 1Z0-051 - Oracle Database 11g: SQL Fundamentals exam. Revision was most conducted using the excellent and highly recommended "OCA Oracle Database 12c SQL Fundamentals I Exam Guide" by Roopesh Ramklass.

I have aimed to include include in these notes common "gotchas" and easy to forget functionality rather than documenting everything required for the exam. This can then be used as a quick refresher before walking into the exam.

The content is broken up into sections with each heading mapping to the relevant [Oracle 1Z0-061 exam topics](https://edu

@switchtrue
switchtrue / ruin_mikes_life.js
Created December 2, 2013 03:24
JavaScript to randomly make part of the screen comic sans and different colours. Purely used to annoy people that hate comic sans.
document.onclick = function () {
// get random table cells
var tdList = document.getElementsByTagName("td");
var i = 0;
while ( i != tdList.length )
{
if ( Math.floor(Math.random() * 20) == 0 )
{
// PRETTIFY!
tdList[i].style.color = '#ff00ff';