Skip to content

Instantly share code, notes, and snippets.

View zombiesbyte's full-sized avatar

James Dalgarno zombiesbyte

  • Zombies Byte
  • UK, England, Newcastle upon Tyne
View GitHub Profile
@zombiesbyte
zombiesbyte / Extending-jQuery-UI-Slider.aa
Last active June 19, 2019 10:07
An extension to the functionality of the jQuery UI Slider
An extension to the functionality of the jQuery UI Slider
# multiple sliders
# added functionality
# extendable
# 1 function to rule them all
Why are gists called after their first alphabetically
ordered files? This is here so this gist didn't end up
being called example.css
@zombiesbyte
zombiesbyte / page.html
Last active April 5, 2019 11:46
Replicate Row (based on Bulma columns but could easily be used in Bootstrap)
<div id="replicateParent">
<div class="columns replicateRow">
<div class="column is-2">
<div class="field">
<div class="control">
<div class="select">
<select name="tenant_title[]">
<option value="Mr" {{ title == "Mr" ? "selected" }}>Mr</option>
<option value="Miss" {{ title == "Miss" ? "selected" }}>Miss</option>
<option value="Mrs" {{ title == "Mrs" ? "selected" }}>Mrs</option>
const Promise = require("bluebird");
const fs = Promise.promisifyAll(require('fs'));
const sqlite3 = Promise.promisifyAll(require('sqlite3').verbose());
const dbName = "roms.db"; //SQLite db file (in db folder)
const db = new sqlite3.Database('db/' + dbName);
let bluePrint = JSON.parse( fs.readFileSync("data/blueprint.json") );
return db.getAsync("SELECT * FROM `p1i` WHERE `name` = '" + entryName +"'")
.catch((e) => { log(e) })