Skip to content

Instantly share code, notes, and snippets.

View kolya182's full-sized avatar
🏠

kolya182

🏠
View GitHub Profile
@kolya182
kolya182 / checkDisk.sh
Created November 27, 2019 01:12 — forked from brimur/checkDisk.sh
Cron script to control
# Name: checkDisk.sh
# Created by: Brimur
# Created: Nov 26th 2019
# This script is used to control Transmission jobs based on available disk space.
#
# This should be run as a cronjob (every minute) on the server/computer running Transmission
#
# If you use a download manager tell it to add jobs as PAUSED
#
# - If disk is nearly full (limit) then stop all jobs
@kolya182
kolya182 / HashTable.js
Last active July 29, 2017 16:46 — forked from alexhawkins/HashTable.js
Correct Implementation of a Hash Table in JavaScript
var HashTable = function() {
this._storage = [];
this._count = 0;
this._limit = 8;
}
HashTable.prototype.insert = function(key, value) {
//create an index for our storage location by passing it through our hashing function
var index = this.hashFunc(key, this._limit);
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
todos: ['wake up', 'eat a breakfast', 'try to take over the world'],
value: ''
}
this.handleChange = this.handleChange.bind(this);