Skip to content

Instantly share code, notes, and snippets.

Eriks Vitolins evitolins

Block or report user

Report or block evitolins

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pointerEvents.js
// https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent
[
{
name : "target",
type: "EventTarget",
description: "The event target (the topmost target in the DOM tree)."
},
{
name : "type",
type: "DOMString",
@evitolins
evitolins / video2canvas.js
Created Jun 23, 2015
HTML5 Video->Canvas
View video2canvas.js
var v = document.getElementsByTagName('video')[0];
var c = document.createElement('canvas');
var ctx = c.getContext('2d');
c.width = v.videoWidth;
c.height = v.videoHeight;
var clock = setInterval(function () {ctx.drawImage(v, 0, 0);}, 0);
document.body.appendChild(c);
@evitolins
evitolins / chromeFix.md
Last active Aug 29, 2015
Wacom/Chrome Issues
View chromeFix.md

Enabling WacomWebPlugin in latest Chrome versions

  1. Worked with 5.3.2-2 (mac)

    • somehow Chrome uninstalled the plugin at some point :/
  2. Uninstalled Wacom Plugin

  3. Installed 5.3.6-6 (mac) with no luck in any browser

View app.js
var addGrid = function(size, cssClass) {
var table = document.createElement('table'),
tr,td;
for(var i=0; i < size; i++) {
tr = document.createElement('tr');
for(var ii=0; ii < size; ii++) {
td = document.createElement('td');
tr.appendChild(td);
}
View app.js
// Pixel Data
var pixel = 10;
var pixels = [
[0,0,0,0,0,0,0,1,0,0],
[1,0,0,0,0,0,0,0,3,0],
[0,0,1,0,0,0,0,1,0,0],
[0,0,0,0,1,0,0,1,0,0],
[1,1,0,0,0,1,0,0,0,0],
[0,0,0,0,0,2,0,0,1,0],
[2,0,1,0,0,0,0,0,1,0],
View app.js
/*jslint
browser: true, devel: true, plusplus: true, unparam: true, todo: true, vars: true, white: true, nomen: true
*/
/*global requestAnimationFrame */
(function() {
var requestAnimationFrame =
window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
View app.js
var app = (function () {
"use strict";
/*
Game Settings
0 = blank
1 = player 1
2 = player 2
*/
var current_player = 1;
View app.js
(function(){
/////////////////////////////////
// Viewport
/////////////////////////////////
var vcvs = document.createElement("canvas");
var vctx = vcvs.getContext('2d');
vcvs.width=480;
vcvs.height=480;
document.body.appendChild(vcvs);
@evitolins
evitolins / css_resources.md
Last active Aug 29, 2015 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.
View css_resources.md

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@evitolins
evitolins / python_resources.md
Last active Aug 29, 2015 — forked from jookyboi/python_resources.md
Python-related modules and guides.
View python_resources.md

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

You can’t perform that action at this time.