Skip to content

Instantly share code, notes, and snippets.

View valorkin's full-sized avatar
🎸
hard rock development

Dmitriy Shekhovtsov valorkin

🎸
hard rock development
View GitHub Profile
@valorkin
valorkin / app-http.js
Last active August 29, 2015 14:05 — forked from Ugmaxie/http
var http = require('http');
var querystring = require('querystring');
var post_data = querystring.stringify({
username : 'demo',
password: 'demo'
});
var options = {
hostname: 'tableready.herokuapp.com',
@valorkin
valorkin / sample-code.adoc
Last active August 29, 2015 14:25
cypher problem

Hello

Problem to solve, split collected data in independent rows

Setup data

create
 (gdp:Indicators{name: 'gdp'})-[:with_dimension]->(dygdp:Dimensions{name: 'years'}),
@valorkin
valorkin / alert.ts
Last active August 29, 2015 14:27
Is host element event handler is set?
// index.ts
// (close) could be set or not
@Component({
selector: 'app'
})
@View({
template: `
<alert (close)="closeAlert(i)">{{ alert1.msg }}</alert>
<alert>{{ alert2.msg }}</alert>
`,
@valorkin
valorkin / plugin-descriptor.ts
Created October 6, 2020 14:44
meeting notes plugin-descriptor.ts
// should be on pair with https://github.com/webpack/webpack/blob/master/schemas/plugins/container/ModuleFederationPlugin.json
// we speak of one config for several types of entries (iframe\webpack\module federation)
// generic = <plugin launcher plugin="name1" module="component1"
// <angular-module-fed-launcher plugin="name1" module="component1" version="" env="production" provider="ariba"
// <iframe-launcher plugin="name2" module="page1"
// <webpack-component pl
// ContainerDescriptor?
<plugin-launcher name= module=>
ng-template #default
#!/usr/bin/env bash
DEPLOY_TO_PREVIEW_CHANNEL_RESULT=$(firebase hosting:channel:deploy pr-$TRAVIS_PULL_REQUEST --expires 30d --token $FIREBASE_TOKEN --json)
RESULT=`echo ${DEPLOY_TO_PREVIEW_CHANNEL_RESULT} | jq -r '.result'`
NGX_BOOTSTRAP_DEMO=`echo ${RESULT} | jq -r '."ngx-bootstrap-demo"'`
SITE=`echo ${NGX_BOOTSTRAP_DEMO} | jq -r .site`
URL=`echo ${NGX_BOOTSTRAP_DEMO} | jq -r .url`
EXPIRE_TIME_UTC=`echo ${NGX_BOOTSTRAP_DEMO} | jq -r .expireTime`
EXPIRE_TIME=$(TZ='GMT' date -d $EXPIRE_TIME_UTC +%c)
@valorkin
valorkin / cuda_2004.sh
Last active January 2, 2023 13:43
NVIDIA CUDA for WSL2
#!/bin/bash
sudo apt-get update
sudo apt install -y build-essential
sudo apt install -y nvidia-driver-460
curl https://get.docker.com | sh \
&& sudo systemctl --now enable docker
@valorkin
valorkin / install.cmd
Last active May 10, 2021 20:32
py for colab ts2 on wsl2
# only windows + python 3.7
# update env_var path for python scripts
# enable long names for terminal
# cuda windows https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/
# tf-gpu https://www.tensorflow.org/install/gpu#windows_setup
pip install jupyter
pip install --upgrade jupyter_http_over_ws>=0.0.7
jupyter serverextension enable --py jupyter_http_over_ws