Skip to content

Instantly share code, notes, and snippets.

View sigorilla's full-sized avatar
🚀
Go high!

Igor Stepanov sigorilla

🚀
Go high!
  • Belgrade, Serbia
View GitHub Profile
@sigorilla
sigorilla / keybindings.json
Created March 29, 2019 06:47
vscode preferences
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+k ctrl+u",
"command": "editor.action.transformToUppercase"
},
{
"key": "ctrl+k ctrl+l",
"command": "editor.action.transformToLowercase"
},
@sigorilla
sigorilla / README.md
Last active April 19, 2018 21:08
SOCKS5

Setup SOCKS5

Prerequisites

Create DO droplet

I use next configuration. Price is 5$/month.

import 'babel-polyfill';
import 'aframe-refraction-system';
import extras from 'aframe-extras';
import {Scene, Entity} from 'aframe-react';
import React from 'react';
import ReactDOM from 'react-dom';
import 'components/threex-portal-door';
import 'components/portal-door';
class App extends React.Component {
This file has been truncated, but you can view the full file.
(function(){"use strict";var ARController=function(width,height,camera){var id;var w=width,h=height;this.orientation="landscape";this.listeners={};if(typeof width!=="number"){var image=width;camera=height;w=image.videoWidth||image.width;h=image.videoHeight||image.height;this.image=image}this.defaultMarkerWidth=1;this.patternMarkers={};this.barcodeMarkers={};this.transform_mat=new Float32Array(16);this.canvas=document.createElement("canvas");this.canvas.width=w;this.canvas.height=h;this.ctx=this.canvas.getContext("2d");this.videoWidth=w;this.videoHeight=h;if(typeof camera==="string"){var self=this;this.cameraParam=new ARCameraParam(camera,function(){self._initialize()},function(err){console.error("ARController: Failed to load ARCameraParam",err)})}else{this.cameraParam=camera;this._initialize()}};ARController.prototype.dispose=function(){artoolkit.teardown(this.id);for(var t in this){this[t]=null}};ARController.prototype.process=function(image){this.detectMarker(image);var markerNum=this.getMarkerNum();var k,o
FROM ubuntu:xenial
RUN apt-get update && \
apt-get install -y <DEPS_IF_NEED>
WORKDIR /usr/local/www/<SERVICE_NAME>
COPY . .
# Build project if need
@sigorilla
sigorilla / deep-partial.d.ts
Last active February 14, 2018 11:41
DeepPartial<T>
type DeepPartial<T> =
T extends any[] ? DeepPartialArray<T[number]> :
T extends object ? DeepPartialObject<T> :
T;
interface DeepPartialArray<T> extends Array<DeepPartial<T>> { }
type DeepPartialObject<T> = {
[P in keyof T]?: DeepPartial<T[P]>;
};
@sigorilla
sigorilla / file.md
Last active January 11, 2018 14:14

Features

The below features are available via the keyboard shortcuts shown, or via the Command Palette:

Feature Shortcut
Rename Ctrl + T Ctrl + M
Find references Ctrl + T Ctrl + R
Next reference Ctrl + T Ctrl + N
Prev reference Ctrl + T Ctrl + P
module.exports = {
extends: [
'plugin:yandex-maps/recommended',
'plugin:yandex-maps/react',
'plugin:yandex-maps/mocha'
],
root: true,
env: {
node: true,
es6: true
@sigorilla
sigorilla / jquery.js
Created June 22, 2016 16:30
jQuery for YModules
modules.define('jquery', function (provide) {
if (typeof window.jQuery !== 'undefined') {
provide(window.jQuery);
} else {
document.getElementById('jquery').onload = function () {
provide(window.jQuery);
};
}
});
@sigorilla
sigorilla / non-ascii.js
Last active September 5, 2016 15:15 — forked from fand/no-japanese.js
Eslint rule to forbid writing non-ASCII characters
/**
* @fileoverview Rule to forbid writing non-ASCII characters.
* @author amagitakayosi
*/
"use strict";
/**
* ASCII characters.
*/