Skip to content

Instantly share code, notes, and snippets.

@DeSater
DeSater / Cache.js
Last active August 19, 2016 17:59
Simple Cache - CommonJS module (requires moment/underscore)
function CacheItem(key, item) {
this.key = key;
this.item = item;
this.timestamp = moment();
}
CacheItem.prototype.isStale = function (ttl) {
return this.timestamp
.add(ttl, 'seconds')
.isBefore(moment());
@DeSater
DeSater / make.sh
Last active June 1, 2016 12:49 — forked from artzub/make.sh
Install JetBrains UpSource + Nginx
#!/bin/bash
apt-get install mc htop git subversion unzip wget curl -y
echo
echo "====================================================="
echo " WELCOME"
echo "====================================================="
echo
echo "Upsource"