Skip to content

Instantly share code, notes, and snippets.

View codev0's full-sized avatar
💪
Harder, Better, Faster, Stronger

Airat Zhanshuakov codev0

💪
Harder, Better, Faster, Stronger
View GitHub Profile
@codev0
codev0 / defaultData.csv
Created November 6, 2023 08:54 — forked from phil-pedruco/defaultData.csv
3D Scatter Plot Using three.js
x y z lp_x lp_y lp_z hp_x hp_y hp_z
0.235458 -0.597702 -0.724487 0.232433 -0.593757 -0.717156 0.003025 -0.003945 -0.007332
0.235458 -0.597702 -0.724487 0.232735 -0.594152 -0.717889 0.002723 -0.003550 -0.006598
0.217346 -0.597702 -0.724487 0.231197 -0.594507 -0.718549 -0.013850 -0.003195 -0.005939
0.217346 -0.579590 -0.724487 0.229812 -0.593015 -0.719143 -0.012465 0.013425 -0.005345
0.199234 -0.579590 -0.724487 0.226754 -0.591673 -0.719677 -0.027520 0.012083 -0.004810
0.199234 -0.597702 -0.760712 0.224002 -0.592276 -0.723781 -0.024768 -0.005426 -0.036931
0.163010 -0.579590 -0.706375 0.217903 -0.591007 -0.722040 -0.054893 0.011417 0.015665
0.108673 -0.597702 -0.724487 0.206980 -0.591676 -0.722285 -0.098307 -0.006026 -0.002203
0.090561 -0.615814 -0.724487 0.195338 -0.594090 -0.722505 -0.104777 -0.021724 -0.001982
@codev0
codev0 / useWS.js
Created August 31, 2021 17:38 — forked from popuguytheparrot/useWS.js
websocket hook with effector
import { useEffect, useRef, useCallback } from 'react';
import { createEvent, createStore } from 'effector';
import { useStore } from 'effector-react';
const open = createEvent('open');
const closed = createEvent('closed');
const error = createEvent('error');
const wsStatus = createStore('closed')
@codev0
codev0 / values_pointers.go
Created August 2, 2020 09:10 — forked from josephspurrier/values_pointers.go
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value
@codev0
codev0 / introrx.md
Created December 19, 2019 17:59 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@codev0
codev0 / dijkstra.js
Created November 14, 2019 17:12 — forked from stella-yc/dijkstra.js
Dijkstra's Algorithm in Javascript using a weighted graph
const problem = {
start: {A: 5, B: 2},
A: {C: 4, D: 2},
B: {A: 8, D: 7},
C: {D: 6, finish: 3},
D: {finish: 1},
finish: {}
};
const lowestCostNode = (costs, processed) => {
@codev0
codev0 / generate-ssh-key.sh
Created October 2, 2019 07:08 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa

Install Mongo with WSL for Windows.

Home

This doc will guide you through installing Mongo DB using WSL through the Command Line.

Most of the steps are listed out here, but this guide will trim them down and make it more straight forward for our needs. There is also 1 step that is not in the link above as well, which will be noted when we come across it.

Install MongoDB Community Edition.

  1. Follow the directions listed on the mongodb official website for your distro of choice.
@codev0
codev0 / RestController.php
Created November 1, 2018 13:54 — forked from cherifGsoul/RestController.php
Yii simple rest controller exemple
<?php
/**
* Controller is the customized base controller class.
* All controller classes for this application should extend from this base class.
*/
class RestController extends CController
{
/**
* @var string the default layout for the controller view. Defaults to '//layouts/column1',
* meaning using a single column layout. See 'protected/views/layouts/column1.php'.
@codev0
codev0 / Event-Module.markdown
Created June 3, 2018 15:05 — forked from zakirt/Event-Module.markdown
Event - JavaScript module handling addition/removal of multiple events

JavaScript Event Handling Module

A JavaScript module allowing addition and removal of multiple events and callback handlers. Its most useful feature is the ability to keep track of attached event handlers. Multiple event handlers can be attached and removed to/from a specific event. The module allows removal of all event listeners at the same time for a specific event, or all listeners for all events, if the user so desires.

  • Can be used with collections, or with a single DOM object.
  • Works on older browsers.

This module was inspired by this answer at Stack Overflow: http://stackoverflow.com/a/4386514

A simple example using Event module can be seen here: http://codepen.io/zakirt/pen/tjkEg

@codev0
codev0 / node-folder-structure-options.md
Created March 27, 2018 20:27 — forked from lancejpollard/node-folder-structure-options.md
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin