Skip to content

Instantly share code, notes, and snippets.

View Daltonic's full-sized avatar

Darlington Gospel Daltonic

View GitHub Profile
@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@underground
underground / indexedDB.js
Created September 6, 2016 01:42
Very simple indexed DB wrapper class for javascript
export default class IndexedDB {
constructor(dbName, dbVersion, stores) {
this.db;
this.dbName = dbName;
this.dbVersion = dbVersion;
this.stores = stores;
}
openDB(callback=(()=>{})) {
if (!window.indexedDB) {