Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<body>
<div id="data"></div>
<script>
const request = window.indexedDB.open("testDB", 1);
request.onupdatedneeded = function(){
const objectStore = request.result.createObjectStore("users", {keyPath:"id"});
objectStore.add({
id: 1,
@bstavroulakis
bstavroulakis / start-stop-server-in-background.sh
Created April 19, 2019 01:37 — forked from pwittchen/start-stop-server-in-background.sh
Starting and stopping simple HTTP server in background on Linux. After starting server and closing terminal, server should keep running
# starting simple HTTP server with Python in background
screen -d -m python -m SimpleHTTPServer 7777
# or for Python 3.x
screen -d -m python -m http.server 7777
# killing process running with screen in background
kill -9 `top -n 1 | pgrep screen`
npm install eslint@4.5.0 eslint-loader@1.9.0 eslint-plugin-html@3.2.0 eslint-config-standard@10.2.1 eslint-plugin-promise@3.5.0 eslint-plugin-standard@3.0.1 eslint-plugin-import@2.7.0 eslint-plugin-node@5.1.1 --save-dev
@bstavroulakis
bstavroulakis / JS-LINQ.js
Created May 4, 2017 14:21 — forked from DanDiplo/JS-LINQ.js
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
{ name: "Judy", age: 42 },
{ name: "Tim", age: 8 }