Skip to content

Instantly share code, notes, and snippets.

View sevastos's full-sized avatar

sevastos sevastos

View GitHub Profile
@sevastos
sevastos / keybase.md
Last active September 13, 2017 18:50

Keybase proof

I hereby claim:

  • I am sevastos on github.
  • I am sev (https://keybase.io/sev) on keybase.
  • I have a public key ASBYNrE63SDNoPvMlC4zQxdkJwCzYaqpwc9z2Lr-EgwlUgo

To claim this, I am signing this object:

@sevastos
sevastos / index.js
Last active May 17, 2017 17:05
requirebin sketch
class Trend {
constructor(database) {
this.database = database;
}
create() {
console.log('create', this.database);
this.database.query();
}
}
@sevastos
sevastos / tourney.html
Last active June 24, 2022 01:32 — forked from sterlingwes/tourney.html
Tournament Bracket Generator (Javascript + CSS, no tables)
<!DOCTYPE html>
<html>
<head>
<title>Tournament Bracket Generator</title>
<script src="https://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdn.jsdelivr.net/clipboard.js/1.6.0/clipboard.min.js"></script>
<script>
$(document).on('ready', function() {
@sevastos
sevastos / stroj-tracker.js
Created September 20, 2015 14:29
storj tracker
// INSTRUCTIONS:
// 1. Update settings & addresses (line 14)
// 2. Generate a bookmarklet using http://chriszarate.github.io/bookmarkleter/
// 3. use it while on http://driveshare.org/status.html
// MAIN CODE:
// Settings
//
// Address to watch.
@sevastos
sevastos / designer.html
Created November 5, 2014 12:28
designer
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../paper-progress/paper-progress.html">
<link rel="import" href="../paper-ripple/paper-ripple.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@sevastos
sevastos / docker-mongo-virtualbox.md
Last active December 3, 2022 10:11
Boot2Docker (VirtualBox) MongoDB volume filesystem issue

Journey

I was using Boot2Docker 1.2 (OSX) and wanted to use volume for MongoDB. First nothing was happening because 1.2 has no Guest Additions and volumes don't work. There is a workaround by making a boot2docker.iso from master which has Guest Additions.

But then Mongo didn't like putting data on VirtualBox's shared folders:

[initandlisten] 	WARNING: This file system is not supported. For further information see:
[initandlisten] http://dochub.mongodb.org/core/unsupported-filesystems
@sevastos
sevastos / classList-multipleClasses.js
Last active December 20, 2015 11:28
Wrapper for adding/removing multiple classes with classList API. Browsers do not identify multiple class names the same way (space delimited or arguments-based)
// Usage:
// el.classList.addMany('so', 'simple');
// el.classList.removeMany('inconsistencies', 'please')
['add', 'remove'].forEach(function(action) {
DOMTokenList.prototype[action + 'Many'] = function() {
for (var i = arguments.length - 1; i >= 0; i--) {
this[action](arguments[i]);
};
}
@sevastos
sevastos / aws-multipartUpload.js
Last active October 8, 2023 10:43
Example AWS S3 Multipart Upload with aws-sdk for Node.js - Retries to upload failing parts
// Based on Glacier's example: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/examples.html#Amazon_Glacier__Multi-part_Upload
var fs = require('fs');
var AWS = require('aws-sdk');
AWS.config.loadFromPath('./aws-config.json');
var s3 = new AWS.S3();
// File
var fileName = '5.pdf';
var filePath = './' + fileName;
var fileKey = fileName;
@sevastos
sevastos / index.html
Created January 26, 2013 13:03
Demo test HTML
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>x</title>
<meta name="description" content="">
@sevastos
sevastos / QRit.js
Created January 26, 2013 13:00
QRit - QR generation code of the current page
javascript:(function(){if(document.getElementById('qrit'))document.removeChild(document.getElementById('qrit'));qrimg=document.createElement('img');qrimg.setAttribute('style','position:fixed;top:0;left:0;z-index:9999;padding:5px;background-color:#fff');qrimg.setAttribute('id','qrit');qrimg.setAttribute('src','http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl='+encodeURI(document.location.href));document.body.appendChild(qrimg);})();