Skip to content

Instantly share code, notes, and snippets.

View simonmorley's full-sized avatar

Simon Morley simonmorley

  • London
View GitHub Profile
package org.simon.webapp
import org.jetbrains.exposed.sql.Table
data class User(
val id: Int?,
val name: String,
val age: Int?,
val email: String
)
package org.simon.webapp
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.transactions.transaction
internal class Data() {
suspend fun findUser(id: Int): User? = dbQuery {
Users.slice(Users.email, Users.name).select { Users.id eq id }.mapNotNull { toUser(it) }.singleOrNull()
Plan: 2020 Base 2 Wks: 15-18 Date: 3 Feb - 1 Mar Year: 2020 Athlete: Simon Morley Coach: Adam Miller adam@squaremiletriathlon.com
MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY SUNDAY TOTALS
30220 40220 50220 60220 70220 80220 90220 WK 1
@simonmorley
simonmorley / gist:8e2ce0f60778086559f45c5f745c3075
Created June 12, 2018 11:32
base64 decode and decompress nodejs
const http = require('http');
var zlib = require('zlib');
http.createServer((request, response) => {
const { headers, method, url } = request;
console.log(request.headers);
let body = [];
request.on('error', (err) => {
<script>
var email;
var origin;
var url = 'https://api.ctapp.io';
var success = function() {
$('#success').removeClass('hide');
$('#submit').prop('disabled', function(i, v) { return !v; });
};
$(document).on("submit", "#request", function( event ) {
console.log('APPLES')
@simonmorley
simonmorley / README.mkd
Created December 3, 2017 16:23 — forked from blmarket/README.mkd
HBase with thrift using node.js

HBase with thrift using node.js

Install (on Mac OS X)

homebrew

Trivial

hbase

@simonmorley
simonmorley / README.mkd
Created December 3, 2017 16:23 — forked from blmarket/README.mkd
HBase with thrift using node.js

HBase with thrift using node.js

Install (on Mac OS X)

homebrew

Trivial

hbase

curl http://127.0.0.1:4242/api/query -d \
'{
"start": 1494984388,
"end": 1595026357,
"queries": [
{
"aggregator": "avg",
"metric": "interfaces.snr",
"rate": "true",
FROM alpine
MAINTAINER Simon Morley
ENV DKRON_VERSION 0.9.2
RUN set -x \
&& apk update \
&& buildDeps='bash ca-certificates openssl wget curl' \
&& apk add --update $buildDeps \
&& rm -rf /var/cache/apk/* \
### Online ###
Hello,
{{ Description }} reconnected.
<b>Mac Address</b>: {{ Ap_Mac }}
<b>Description</b>: {{ Description }}
<b>Last heartbeat</b>: {{ Last_Heartbeat }}