2021-04-13

New device to play with Asterisk

raspberry

I have created a new device for experimenting with Asterisk. For some reason, the firmware made by the author of raspberry-asterisk hangs at random times. Sometimes it works for several days, sometimes it freezes after a few minutes. At first, I sinned on the raspberry itself, then on the SD card, then on the power supply. However, the device freezes stably.

Yes, I know that it is impossible to assemble a stable working device with an asterisk on a ten dollar board that will fully fulfill the functions of an "adult" ATC. I know that for something more serious you need more serious equipment. But I still want to know how to do it!

Having adjusted the memory and temperature monitor of the device, I noticed that the device does not consume a lot of memory and does not go into CPU throttling, but, nevertheless, the processor temperature is slightly higher than on a similar device without an asterisk.

I decided that it was all about the firmware itself, because even the author of rasbnerry-asterisk no longer supports Raspberry Pi Zero in new images.

Therefore, I decided to install Asterisk on Debian from scratch, fortunately, the network already has instructions how to do it. In order to do it I ordered a new board and a USB hub. The board was powered from the same hub. Not all devices allow that, but this one worked as expected. The USB stick was also was successfully discovered by the device as well.

Compilation of the asterisk took several hours, but everything worked as it should and in the end I got a completely working system.

While the device works stably - let's see how long it will work in this incarnation.

 

Коментариев: 1

 
  2021-01-20

Dummy Credit Card Numbers

useful

Sometimes when when you develop, for example, an online shop you need the credit card number that passes the credit card validation test.

There are many sites that could give you a bunch of random cards e.g. this one.

But much simpler to remember couple of them so you do not need to copy paste anything fromt third party resources.

There are two numbers that can be used in this situations which can be easily remembered:

4111 1111 1111 1111

and 

4242 4242 4242 4242 

I did know about the first one but I did not know about the second one which is also quite easy to remember.

 

Оставить комментарий

 
  2021-01-09

Eye tracking with mobile phone

wearable

Such an incredible idea of using a smartphone with front camera as an eye tracking device. I love this approach!

 

Оставить комментарий

 
  2020-12-18

How to build custom Alexa Skill

Tried out creating custom Alexa Skill. There is a great tutorial for doing that.

Good thing that it works immediately on my mobile device so it is not required to publish it if you build something for fun!

One thing did not work well for me - I can not access and delete stored information in the S3 Bucket that is used to store my birthday, therefore I can not run an application more than once. Lets see if the issue will be fixed or I have to ask support to help me out.

The voice assistans with time will be very popular - such devices are very cheap now but I would use them with caution - there are still many problems and skills are very basic yet.

 

Оставить комментарий

 
  2020-11-14

How to install Git on Android phone

Questioned myself, is it possible to create git repository on android phone, edit project files on android phone and then push these to remote repository? Appeared that it is possible and works really well!

In order to do that I have installed Termux, Termux:Api, Termux:Widget. It is important to install all three apps from one market - they exist in F-Droid и Android Play Market but the last one in Android Play costs $2 but in F-Droid - it is free.

Run Termux and install all necessary packages, allow access to file system:


pkg install git openssh termux-api
termux-setup-storage

Create project folder:


mkdir /storage/emulated/0/Documents/work
cd /storage/emulated/0/Documents/work
git init
git remote add origin git@github.com:username/reponame.git
git config --global user.email "your@email.com"
git config --global user.name "Max"
nano readme.md
git add readme.md
git commit -am"first commit"
#create keys pair:
ssh-keygen
cat /data/data/com.termux/files/home/.ssh/id_rsa.pub
#copy the public key into the remote folder.

Creating folder with startup scripts:


mkdir -p $HOME/.shortcuts
mkdir -p /data/data/com.termux/files/home/.shortcuts/tasks
cd /data/data/com.termux/files/home/.shortcuts/
nano ./push.sh 
chmod +x push.sh

push.sh looks like this:


#!/data/data/com.termux/files/usr/bin/bash
cd /storage/emulated/0/Documents/work
git add *
git commit -am"autocommit"
git push origin master
termux-toast "Changes successfully pushed" 

Create pull.sh:


#!/data/data/com.termux/files/usr/bin/bash
cd /storage/emulated/0/Documents/work
git pull origin master
termux-toast "Changes successfully pulled"

Add the widget on our screen and use it to trigger pull и push scripts from there!

Now I can push and pull changes from my phone screen!

 

Оставить комментарий

 
  2020-10-18

Floating point precision

Found interesting thing in Raimond Hattinger twitter for Python.

It works also in Javascript:

var x = 12345678901234567.0
console.log(x === x + 1); //true	

 

Оставить комментарий

 
  2020-05-05

Interactive Vim Tutorial

Found very simple Interactive Vim Tutorial. If you want to grab some Vim magic - really recommend it.

 

Коментариев: 1

 
  2020-04-16

Leetcode 30 challenge

The best usage of time during quarantine is developing your coding skills in 30 Leetcode Challenge - I love it, just select your favorite programming language and solve tasks. It is super helpful if you are software engineer or just love programming. 

 

Оставить комментарий

 
  2020-04-09

Site redesign

Decided to rededign this website a little bit. If there will be any problems with it lately, please let me know. Generally there are may things I want to do - add support of social networks, messengers, fix the registration flow which is broken for many years... Surely all this will be never done, but...

 

Оставить комментарий

 
  2013-01-01

Simple Text Editor

android

Created new version of Simple Text Editor for Android.

- fixed a lot of issues;
- added new customiation settings for font and background colors, font selectors etc.;
- simplified file selector dialog;
- created new icons;
- added new "Save As" and "New" comand;
- many some other minor changes

Now it is full features text editor which is available on Google Play.

 

Коментариев: 3