Saturday, August 15, 2020

Managed Identity authentication with Azure WebApp on .Net Core


Would like to share how to make seamless authentication in a WebApp in Azure with Managed Identities (System or User assigned one). 

This approach won't require passing any password/secrets or certificates to WebApp itself, which is pretty convenient thing.

There are 2 type of identities that possible to use - System Assigned, and User Assigned

Wednesday, July 08, 2020

FreeTON Validator Node


FreeTON is inheritor of TON blockchain which effectively got banned due to US court restricted GRM tokens worldwide. However, FreeTON project focuses on new, non-financial, use-cases of TON technologies and strives to bring this unique blockchain back to the world. 

FreeTON also going to have own tokens (as every blockchain) named Rubies and going to distribute those conducting several contests. One of such is Validator contest, where devops skills will come handy and the goal is to rollout own Validator node, as well as bring up logic that going to make stakes via this node and by that participate in Proof-of-Stake validation cycles confirming transactions in the blockchain.

I would like to share own solution that brings up Validator Node (full-node) from scratch as well as deploys application that can communicate with the node and perform staking, along with monitoring the node.

I called it SuTon (kind of short of Sudo Ton), as it ultimately it will allow you to control the node in every possible way. 
Github with code and instructions is here: https://github.com/jarig/suton

The main idea behind the architecture was to make node safe and expose as less as possible number of ports, hiding full-node from the outer world, however at the same time having possibility to control it and monitor.

Wednesday, January 01, 2020

Nested Git repository support for Atom editor

Our 200 repository project for Chef consist of many nested repositories (one 'base' repo with essentials, which in turn contains 'cookbooks'). This was quite big frustration and super-inconvenient to use editors neither of which were supporting nested Git repos in full. Atom has in general good Chef support (via extensions), but nested Git repositories still not supported (at least by the time this article is written).

This is especially frustrating when several cookbooks modified and there are no indicators of what's already committed, what files were touched added, removed or modified in the end.

So, I've modified 'tree-view' component - one of core components Atom has, which is responsible for showing directory view on the left, so that now it shows statuses of all nested repositories (no matter how deep nesting is) giving good overview on the changes being made.

Here is example how it looks:

repo_highlights


Unfortunately Atom maintainers in the end closed suggested Pull Request -
https://github.com/atom/tree-view/pull/469

Reasoning is unclear and vague.
However, I've made release of tree-view from own fork.

Notes:

Works quite well even with >200 nested .git repos, though with some minor limitations:
  1. If there are a lot of nested. git repos then start-up time might noticeably increase(with ~200 repos it was 10 sec). The reason is that GitRepository object seems to be not fully async while refreshing status.
  2. Status refresh of GitRepositry objects on window_focus event is disabled, so if repos changed out of the Atom it might reflect wrong status. But there is option (right-click or assign shortcut) to force-refresh status of a subtree (recursively) or specific repo.

    or via command palette.



Download tree-view:
https://github.com/jarig/tree-view/releases/download/0.228.0-jarig/tree-view.zip

Installation instructions:
  • Unpack contents to ~\.atom\packages\tree-view
    (on windows C:\Users\[username]\.atom\packages\tree-view)
  • Re-open Atom
Atom might show bug icon in the status bar, asking to rebuild packages - do that in this case and tree-view will appear after Atom reload (ctrl+k to toggle tree-view back).




Verified to be working with Atom version 1.42.0


Monday, December 23, 2019

Vue + Electron + TypeORM, nice combo with small tricks


Found very neat combination of modern technologies that makes cross-platform desktop app development much easier:
- VueJS
- Electron
- TypeORM

VueJS actually has tutorial for creation of simple project, quick steps are:

$ npm install -g @vue/cli @vue/cli-init
$ vue init simulatedgreg/electron-vue test-electron-app

However, once I combined all of that together couldn't make TypeORM to work as it appeared it does mocking if thinks it works in 'browser' mode and disables all its drivers.

Symptom of this is the following error:

TypeError: this.driver.connect is not a function

Spent few days on that, and eventually found resolution. You need to change vue.config.js (which is webpack representative for Vue) and mark typeorm + whatever driver package you use as externals in this way -

  "transpileDependencies": [
    "vuetify"
  ],
  configureWebpack: config => {
    config.externals = {
      typeorm: "require('typeorm')",
      mysql: "require('mysql')"
    }
  }
}

After that all those packages combined will work as expected, giving you all flexbility of Vue, cross-platform and desktop support of Electron as well as powerful ORM with whatever database you've.




Sunday, December 08, 2019

Starting Entrepreneur Career, absolutely the must video to see

Tackled the video which is absolutely the must to see for people who want to start own business, well and actually just interesting and educating in general:



There are many of those videos under this profile, really worth to subscribe.

Friday, July 05, 2013

Win8 Interactive Sessions

In case if a service tries to run an application which shows GUI, that GUI will be shown in session 0(that applies only to Win-8)

It's possible to see what's happening in that mysterious 0 session, by following these steps:
1. Enable Interactive sessions:
Hive: HKLM
Path: SYSTEM\CurrentControlSet\Control\Windows
DWORD: NoInteractiveServices
Change value from 1 to 0


2. Go to services and enable - Interactive Services Detection service.


Now you can run any application in 0 session for testing:
psexec -i 0 calc.exe

Such a popup should appear, and if you press "View the message" you will be directed to the new session:

Картинки по запросу "View the message" windows session



Sunday, April 25, 2010

Mobile Communications - Jochan Schiller

Book that I couldn't get from any library as it was either already given away(1-2 copies) or just missing.

Repost from:
http://vikrantshukla.blogspot.com/2009/07/mobile-communications-jochen-schiller.html
Thanks vikrantshukla! I have reuploaded book to my GDocs as well.




Mobile Communications by Schiller is a solid book that explains wireless concepts the way they are and doesn't care about the mathematics underneath. This book lays a strong foundation about mobile communication in the minds of its readers.


Sunday, March 07, 2010

Игры

Занимательная командная игра разработанная для Шведской армии.

Суть игры проста, нужно выполнять различные задания на память и концентрацию.
За верно выполненное задание прибавляется время вашему партнеру по команде, за неверно выполненное — отнимается. Таким же образом, ваше время целиком зависит от одного из партнеров в команде.


Friday, March 05, 2010

KeyholeWatcher

Наткнулся недавно на два очень занимательных сайта:
http://www.ivi.ru
http://www.kenguru.tv

Оба предоставляют (пока)бесплатный доступ к множеству фильмов и сериалов любого жанра в высоком качестве.
Но естьбыла одна небольшая загвоздка - смотреть разрешено только владельцам русских ИП'шников (тобиш официально смотреть можно только с России).

Я решил попробовать исправить эту несправедливость :) На что было написано 2 "хака" обходящие проверку на доступность контента и затем объединены в удобный(а может не очень) Extension для Google Chrome.

Доступен отсюда : www.polpiva.pri.ee/iviWatcher.crx

Для проверки зайдите на какой либо из сайтов на страницу непосредственного просмотра фильма. На ней вас скорее всего задискретитируют по географическому признаку, но не стоит унывать. В правой часте адресной строки Хрома должна появится круглая синяя пилюля - она то и есть спасение ! :) Жмете на нее, а затем, в зависимости от того на каком вы из двух сайтов - на Open или Flv-*(hi, lo).

ПС Возможно понадобится исправить политику безопасности для локального флеш плеера. Для этого надо нажать на Settings при уведомлении флеша о попытки соединиться с посторонним сервером, а на появившемся сайте нажать Add Locations.
Скопировать строчку с нижнего поля в верхнее и ОК. Теперь вроде все.
Или можно сразу добавить эти 2 ссылки:
chrome-extension:\\gfkpemfknofagepjcbhkhcejhjalbfnc\kenguruPlayer\player.swf
chrome-extension:\\gfkpemfknofagepjcbhkhcejhjalbfnc\flowPlayer\player.swf


Tuesday, March 02, 2010

Flash VLC-Plugin Controls

Couple of days was trying to find some controls for VLC web plugin with no success...
So I have made own one :)

Here are my Flash Controls:

It is the very first version, so nothing special, just simple controls.

For testing purposes:

Or by link.


Sunday, November 23, 2008

Черный экран видео с Beryl 'om

Чтоб можно было нормально смотреть видео при этом не выключая берила:

Gstreamer

That’s the default Ubuntu player, used by Totem. To correctly visualize you video files with Totem proceed as follows:

1) Open a terminal and enter:

gstreamer-properties

2) Move to the video tag.
3) In default video plugin select “X Window System (without Xv)”.
4) Click on try to verify if it works fine.
5) Close this window, problems solved.

Vlc

That’s my preferred player, I always use it and surely many of you do too. It is very important to have it working correctly, so:

1) Run vlc.
2) Settings –> Preferences.
3) Selct video and then outpoot modules.
3) Check the little “Advanced options” check box on the button left corner of this window.
4) New options will now appear, so in video outpoot choose “X11 video out”.
5) Save and exit. Mission completed.
Mplayer

I never use it and every time I try to open something with it, it never works ;P but if you use it…:

1) Run Mplayer.
2) Right click on the screen and select Preferences.
3) Select the video tag and in available drivers choose X11 (XImage/Shm).
4) Save and restart the application.

Xine

Very useful if you use Kaffeine or Totem with xine:

1) Run xine.
2) File –> configure –> preferences.
3) In experience_level select “Master Of The Known Universe” so that all the setting become visible.
4) Select the video tag.
5) In driver choose “xshm”.
6) Restart Xine.

Источник

Friday, November 21, 2008

Куча нюансов

В линуксе с Си куча проблем оказывается, надо заботится буквально о каждой мелочи.

Чтобы правельно считать нескольно отдельных строчек с пробелами:

scanf(" %[^\n]",answer);
scanf(" %[^\n]",answer);

обязательно пробел до экспрешона, а то этот сканф сожрет
предыдущий ентер из stdin'a и будет доволен...

fflush(stdin) чего то не помогает ...

Вместо stricmp в линухе функция для сравнения без учета регистров strcasecmp();
инклуд: strings.h

To be continued...

Wednesday, November 12, 2008

Будущее

Интересное будущее нас ждет ) Чувствую скоро мы так же не будем разбираться в управлении новыми системами, как сейчас некоторые более взрослые дяди и тети не разбираются в нынешних, неумело держа мышку, печатая 1 пальчиком. На улицах к нам будут приставать всякие голографические рекламщики, а чтобы переключть песню на плеере нужно будет только об этом подумать ... )
Жду не дождусь :)
Вот несколько любопытных вещей: ( все по сцылке )
Aurora

Недавно, Adaptive Path представила новую концепцию браузера, которая была разработана в сотрудничестве с Mozilla Labs и является инициативой подтолкнуть дизайнеров и разработчиков реализовывать их видение будущего браузера и Сети.




Brainloop: контроль мыслей

BrainLoop - это интерактивная платформа, которая позволяет пользователям управлять объектами на экране с помощью мозга - изображая определённые команды, без единого нажатия. Я, конечно, не уверен насколько эффективен этот подход, но, определённо, это довольно необычая идея.




Ringo: Голографический пользовательский интерфейс

Ringo - это идея, которая демонстрирует возможности, которые предлагает голографическая "тень", которая может заменить PDA или сотовый телефон. Это выглядит впечатляющим и многообещающим. Что-то типа этого мы сможем использовать ужев недалёком будущем. Кстати, разработана эта идея Иваном Тихиенко.


Eyeliner 3D

Eyeliner 3D - это высококачественная система проецирования, которая в основном использует HD видео, чтобы производить 3-х мерные голографические изображения. Недавно, эта система использовалась для продвижения Тойоты Аурис в Bluewater Shopping Centre в Европе.


Tuesday, November 11, 2008

Monday, October 06, 2008

Творческий подход к ограблению банка проявил пользователь сервиса онлайн-объявлений Craigslist.org: он предложил 28,5 долларов каждому, кто придет в указанное время к офису кредитной организации в голубой футболке с длинными рукавами, желтом спасательном жилете, в защитных очках и с респиратором на лице. Ничего не подозревающая массовка "флешмобберов" должна была обеспечить своего рода отвлекающий манёвр.

Во вторник, когда около офиса Bank of America в маленьком городке Монро (40 км от Сиэттла) собралась толпа ищущих лёгкого заработка людей в указанной экипировке, к банку подъехала инкассаторская машина. Из толпы выскочил один человек, брызнул в лицо инкассатору газом из баллончика, схватил мешок с деньгами и вновь затерялся в массе своих клонов.

По словам полицейских, вскоре дерзкий грабитель благополучно скрылся от преследования. В данный момент агенты ФБР пытаются установить личность человека, давшего объявление. Пока что никто арестован не был. Также, судя по всему, не получили своё вознаграждение граждане, выступившие в роли пособников.

Saturday, May 24, 2008

Some bash scripts.

Make your console nicer and more useful:
user-) cd Download/
WD=/home/user/Download
user-Download-)
Insert this code to .bashrc file in your home folder:
function SetPS1()
{
local HostBit=""
if test "$OS" = "Linux"
then
if test "`who|grep "$USER"|grep \"tty[1-6]\"`" = ""
then
HostBit="@\h"
fi
fi
local DirBit="-\W"
test "`pwd`" = "$HOME" && DirBit=""
case "$TERM" in
xterm|linux) PS1="\[\]\u\[\]$HostBit\[\]$DirBit\[\]-) " ;;
*) PS1="\u$HostBit$DirBit-) " ;;
esac
}

SetPS1

thcd()
{
builtin cd "$@"
if test -t 1
then
case $TERM in
xterm) echo "WD=`pwd`" >&2
echo -n "]0;XT `basename \"\`pwd\`\"`" >&2 ;;
*) echo "WD=`pwd`" >&2 ;;
esac
fi
SetPS1
}
alias cd='thcd'

Installing audio and mp3 support.

MP3 support for Amarok player.
Required software:
Some good MP3 players:

Friday, May 23, 2008

Linux commands and tricks

Just Commands:
sleep X -
sleeps for X seconds
chroot -
root to selected dir
slocate - find file from database suppressing all permission warnings.
which - shows where
specified program is located in PATH
w - show who is logged on and what they are doing
tput - change cursor location, colour, text format.


Change last entered command:
^what_to_change^how_change - changes last entered command.
$:man bash
$:^ba^c ( that will give - man csh )

Changing default shell:
/etc/passwd holds starting shells for each user on machine.

Auto Mounting:
/etc/fstab holds all devices that should be mounted automatically.
/dev/sda3 /win ntfs defaults 0 0
Script commands:
enable - execute program
source - include other file to current script


Switching workspace in command line:

GNOME DESKTOP
  • [ program wmctrl needed ] ( yum install wmctrl )
  • wmctrl -s desktopNum
Restoring GRUB loader:

Restoring GRUB:
  • Boot from live CD(say knoppix)
  • mount /dev/sda1 /media/sda1
    (mount system)
  • chroot /media/sda1
  • grub-install /dev/sda
    ( or /dev/sdaNUM, where NUM is partition )
OR
  • mount /dev/sda1 /
    (mount system)
  • grub
    ( opens grub terminal )
  • find /boot/grub/stage1
    ( shows partitions where grub is installed )
  • root (hd0,partNum)
    ( partNum you can get from previous command, hd0 - means first hard disk, hd1 will be second.. )
  • setup (hd0)
    ( if grub has to be installed to MBR. Or [ setup (hd0,partNum) ] - installs GRUB to linux root partition)

Thursday, May 22, 2008

Настройка вебкамеры(A4tech PK-635)


Camera: A4tech PK-635

Required software: Installation:
  1. make
  2. make install
  3. install -c -m 0644 gspca.ko /lib/modules/`uname -r`/kernel/drivers/usb/media/ (навсякий случай еще раз)
  4. /sbin/modprobe gspca
  5. /sbin/lsmod | grep gspca (проверка)
  6. ls -lad /dev/video* (проверка)
Useful links: https://help.ubuntu.com/community/Webcam