Skip to content

Instantly share code, notes, and snippets.

@mikeymop
mikeymop / index.html
Created December 21, 2019 23:41
Recent Listens Widget
<html>
<head>
<meta charset="utf-8"/>
<script type="module">
import { Util } from './js/util.js';
window.onload = function() {
console.log("loading");
const util = new Util();
}
</script>
import { Util } from "./util";
import { Server } from "./server";
import { State } from "./state";
export class App {
public static user = null;
public static util = new Util();
public static server = new Server(); // err here
public static navigationView = null;
public static _globalState = new State();
import { EventObject } from "tabris";
// Type definitions for Apache Cordova Network Information plugin
// Project: https://github.com/apache/cordova-plugin-network-information
// Definitions by: Microsoft Open Technologies Inc <http://msopentech.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
//
// CopyrigNavigatorht (c) Microsoft Open Technologies Inc
// Licensed under the MIT license
@mikeymop
mikeymop / index.html
Created October 20, 2019 00:52
Infinite form to JSON
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Forms!</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
<script defer src="script.js"></script>
<link rel="stylesheet" href="css/styles.css">
</head>
@mikeymop
mikeymop / notes.md
Last active October 3, 2019 03:18
SPAM migration notes
@mikeymop
mikeymop / dserve.dart
Last active July 30, 2019 20:40
Gist of a simple dart http server that can handle JSON with an inconsistent schema.
import 'dart:io';
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart';
void main(List<String> args) async {
String url, port;
try { url = args[0]; } catch(e) { print("Need a url"); exit(-1); }
@mikeymop
mikeymop / main.dart
Created July 30, 2019 15:01
main.dart
import 'dart:convert';
import 'dart:async';
import 'dart:io';
String _parseJson(String jsonString) {
Map decoded = jsonDecode(jsonString);
String name = decoded['title'];
return name;
}
@mikeymop
mikeymop / prog.py
Last active July 11, 2019 05:03
Helped a friend understand python using a Singly LInked List
from sll import *
sll = linked_list() # create a list object
sll.sll_push(1) # push a number to the list
sll.print_list() # this will internally store the
sll.sll_append(4) # value in a node
sll.print_list()
sll.sll_append(3)
sll.print_list()
sll.sll_append(8)
@mikeymop
mikeymop / lightdm.conf
Created July 10, 2019 16:08
Fix lightdm Intel
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "sna"
EndSection
From: https://github.com/the-cavalry/light-locker/issues/114#issuecomment-470263090
@mikeymop
mikeymop / vscode-settings.json
Created June 23, 2019 06:55
Backup of my VSCode Settings
{
"workbench.colorTheme": "Cobalt2",
"workbench.iconTheme": "material-icon-theme",
"window.zoomLevel": 0,
"editor.fontFamily": "'Hack', 'Droid Sans Mono','monospace'",
"editor.fontSize": 16,
"editor.fontLigatures": true,
"editor.tabSize": 4,
"editor.lineHeight": 0,
"explorer.openEditors.visible": 0,