Skip to content

Instantly share code, notes, and snippets.

View wegorich's full-sized avatar
💩
Crappy codding

Egor Malkevich wegorich

💩
Crappy codding
View GitHub Profile
@wegorich
wegorich / cloudSettings
Last active February 4, 2019 11:27
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-02-04T11:27:46.791Z","extensionVersion":"v3.2.4"}
@wegorich
wegorich / note
Last active April 8, 2017 16:16
VR
controller samples
https://github.com/thestonefox/VRTK/blob/master/EXAMPLES.md
renderer
https://github.com/ValveSoftware/the_lab_renderer
sample archery game
https://github.com/adestefa/VRWatchTower
more accurate
https://github.com/vmohan7/Bow-ArrowLiveStream
@wegorich
wegorich / xcarchive2ipa
Created January 10, 2017 17:51 — forked from samma835/xcarchive2ipa
How to convert .xcarchive to .ipa
xcodebuild -exportArchive -exportFormat ipa -archivePath {PATH}/MyApp.xcarchive -exportPath ~/Desktop/MyApp.ipa
@wegorich
wegorich / base-vm.js
Created September 12, 2016 16:01
Using the Aurelia with Redux
export class BaseVM {
_syncInit() {
this._sync();
this._unsubscribe = this.store.subscribe(this._sync.bind(this));
}
_syncUnsubscribe() {
this._unsubscribe();
}
@wegorich
wegorich / gist:3c967a18c02dfa68927e676ce830e4e3
Created June 22, 2016 08:32 — forked from paveleremin/gist:86dafdb4341244fc3a94
Brackets are correctly nested (two different approaches)
/**
* Implement function check (text) which checks whether brackets within text are correctly nested.
* You need to consider brackets of three kinds: (), [], {}.
*/
/**
* STACK approach
*/
function check(str){
var brackets = "()[]{}",
@wegorich
wegorich / calculart-potato-progress.js
Last active June 2, 2016 15:36
samples form file uploader speach
$.ajax({
xhr: ()=> {
var xhr = new window.XMLHttpRequest();
xhr.upload.addEventListener("progress", (e)=> console.log(e.loaded / e.total) //progress
, false);
return xhr;
},
processData: false
});
@wegorich
wegorich / updateDictionaries.js
Created May 17, 2016 01:22
4front best practice update loadDictionaries ....
updateDictionaries() {
let promise = this.api.getDictionaries(this.lastUpdatedDictionariesTimestamp).then(res => {
let result = res.result;
if (!this.lastUpdatedDictionariesTimestamp) {
....
} else {
this.applyChangesToMap(this.someMap, result.someMapData);
....
}
this.lastUpdatedDictionariesTimestamp = result.date;
@wegorich
wegorich / client.js
Created May 16, 2016 23:49
4front minimal socket code
import api from './api';
import io from 'socket.io-client';
import {EventAggregator} from 'aurelia-event-aggregator';
const MSG_DATA_CHANGE = "peer-msg";
export class DataChannel {
static inject = [EventAggregator];
constructor(ea:EventAggregator) {
@wegorich
wegorich / custom-event.js
Created April 8, 2016 14:21
Es6 custom events
let e = new CustomEvent('change', {
detail: {value: that.value}
});
that.element.dispatchEvent(e);
@wegorich
wegorich / OSX UTC Time Zone
Created March 11, 2016 14:47 — forked from nick-desteffen/OSX UTC Time Zone
Set Time zone in OSX to UTC
sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime