Skip to content

Instantly share code, notes, and snippets.

View Darkmift's full-sized avatar
🎯
Focusing

Avi E. Koenig Darkmift

🎯
Focusing
View GitHub Profile
@traffisco
traffisco / dynamicStorage.js
Last active August 20, 2021 11:12
Make localStorage as simple read/write object
Storage.prototype.proxy = {}
Storage.prototype.getAll = function () {
data = {};
Object.keys(this).forEach(key => {
try {
data[key] = JSON.parse(this[key]);
} catch {
data[key] = this[key];
}
});
@aminnairi
aminnairi / MaterializeSelect.js
Last active March 5, 2021 16:17
Vue.js wrapper for the MaterializeCSS's select component
'use strict';
// https://codesandbox.io/s/v37l3k0k53
const Vue = require('vue') // npm install vue
const M = require('materialize-css') // npm install materialize-css@^1.*
Vue.component('MaterializeSelect', {
template: `
<select :value='value'>
@petrov82
petrov82 / stardate.js
Created September 15, 2014 17:55
JS Stardate
// Stardate script © Phillip L. Sublett
// Phillip.L@Sublett.org
// http://TrekGuide.com
var now = new Date();
var then = new Date("July 15, 1987");
var stardate = now.getTime() - then.getTime();
stardate = stardate / (1000 * 60 * 60 * 24 * 0.036525);
stardate = Math.floor(stardate + 410000);
stardate = stardate / 10
@danferth
danferth / PDO classes.md
Last active May 15, 2023 01:17
PHP classes for PDO

PDO Classes for db connect and manipulation

Below is a description on how to use the classes in the below script

Include script and set up db variables

include 'zdb.php';