How to disable OnePlus / CyanogenOS application suggestions

If you are getting annoyed with recent update new feature showing microsoft office (and possibly other) applications as suggested while opening some files, here are steps to disable them:

  1. Go to Settings
  2. Go to Applications
  3. Swipe to All (last on the right) tab
  4. Find ‚Cyanogen Application Suggestions’
  5. Click
  6. Click Disable

Done

Smart Prototyping – PCB Prototyping review

http://smart-prototyping.com/PCB-Prototyping.html – another cheap Chinese PCB Manufacturer review

My order:

  • PCB
    • 2 layers
    • 10cm x 10 cm
    • 10 pieces
    • PCB Thickness: 1.6mm
    • Copper thickness: double – 2oz/ft2 = 70um
    • Surface finish: HASA
    • Solder mask color: Green (additional fees for other colors)
    • No sub-boards
    • 100% E-Test
  • Stencil – frameless 13cm x 21cm

Czytaj dalej

ShenZen2U PCB Prototyping Review

http://www.shenzhen2u.com/PCB – cheap Chinese PCB Manufacturer review

My order:

  • PCB
    • 2 layers
    • max 5cm x 5 cm
    • 10 pieces
    • PCB Thickness: 1.6mm
    • Copper thickness: standard – 1 oz/ft2 = 35um
    • Surface finish: HASA
    • Solder mask color: Green (additional fees for other colors)
    • No sub-boards
    • 100% E-Test
  • Stencil – frameless 19cm x 29cm

Czytaj dalej

Cheap PCB prototyping & manufacturing in China – reviews

Review of some Chinese PCB prototyping services and manufacturers

I’m in progress of testing some of cheap Chinese PCB manufacturers. I’m going to try to write detailed description for each of them.

Tested so far:

JLCPCB.com

Link:
https://jlcpcb.com/

Review:
JLCPCB.com – The best value for money PCB Service in 2017

SeeedStudio Fusion

Link:
https://www.seeedstudio.com/fusion_pcb.html

Review:
SeeedStudio.com Fusion – New PCB Services from popular DIY and prototyping company

Dangerous Prototypes

Link:
http://dangerousprototypes.com/store

Review:
Dangerous Prototypes – PCB Manufacturer Review

DirtyPCBS

Link:
http://dirtypcbs.com/

Review:
DirtyPCBS.com – PCB Prototyping review

shenzhen2u

Link:
http://www.shenzhen2u.com/PCB

Review:
ShenZen2U PCB Prototyping Review

smart-prototyping

Link:
http://smart-prototyping.com/PCB-Prototyping.html

Review:
Smart Prototyping – PCB Prototyping review

ShenZen2U and SmartPrototyping looks bascily like the same company. But they are not (as SmartPrototyping explained).

AMD AM1 (Athlon 5350) Real power consumption

Rationale

A few days ago I was building rack 19″ server based on AMD Athlon 5350 CPU. The main goal was to create a hardware set that will operate on wide supply voltage ranges (48V, 24V, 19V) and will be power efficient.

I decided to take a look at quite cheap AMD AM1 Athlon APU with TDP said to be 25W.

Czytaj dalej

Installing and running SCons on Windows with MinGW

1. Installing Python 2.x 32bit

Right now, when SCons  2.3.4 is the latest available version, it won’t work with python >= 3.4.1. Thats because of modified behavior of print function. Its usage without ( ) is depracted and causes errors in latest python version. This construction is still used in some of SCons scripts.

SCons installer is also not capable of finding installation of 64 bit python.

Thats why you should choose latest ‚2’ version in 32 bit. For me – 2.7.9

For purposes of this test I put Python in default directory:

C:\Python27\

2. Installing SCons

The easiest way to install SCons on windows is to use default Win32 installer. There are no sophisticated install options.

Installer will put some files in <Python>\Scripts directory. Nothing more, nothing less.

Main SCons executable is wrapped with scons.bat which should be used as default SCons launcher.

3. Creating SCons launcher in projects directory

In your project directory in which your SConstruct file is located you should create new batch file. For purposes of this tutorial I called it ‚run_scons.bat’.

Inside put something like:

"C:\Python27\Scripts\scons.bat"
if NOT ["%errorlevel%"]==["0"] pause

This will simply run scons.bat in SCons installation directory and pause closing of command line dialog if error occurred.

Creating shortcut to scons.bat won’t work since shortcut changes working directory of environment to targets directory. We want to stay in projects directory.

 4. Configuring SCons to use MinGW instead of MSVC++

Some steps must be done in SConstruct to properly use MinGW compiler

  1. Environment must be initialized with tools = [‚mingw’] parameter
  2. Environment[‚ENV’][‚PATH’] must have „bin” directory of MinGW
  3. Target should be linked with -static option enabled

for example:

(...)
E = Environment(tools = ['mingw'])
E['ENV']['PATH'] += ';' + r'C:\Program Files (x86)\mingw-w64\i686-4.9.2-posix-dwarf-rt_v3-rev1\mingw32\bin'
E.Append(LINKFLAGS = "-static")
(...)

5. Running SCons

Just double-click run_scons.bat 🙂

gcc / g++ – minimalizacja rozmiaru pliku binarnego, usuwanie nieużywanych funkcji

Wstęp

Rozmiar nas ogranicza. W przypadku komputerów klasy PC nie jest to problem aż tak znaczący jak w architekturze AVR, gdzie ogranicza nas pamięć o rozmiarze 4/8/16/32KB.

Sporo miejsca możemy zaoszczędzić zmuszając kompilator do optymalizacji rozmiaru, usuwając nieużywane funkcje z kodu, itp.

Mniejszy rozmiar pliku binarnego to także szybsze uruchomienie aplikacji.

Czytaj dalej

Super skrypt do pracy z obrazem minixa i emulatorem qemu

Ah to SOI. Zabrakło 0,5pkt do 5, a głupio było się tak po prostu poddać 🙂

Udałem się więc po dodatkowe zadanie. Jak się okazało musiałem wymyślić je sobie sam, ostatecznie wpadłem na genialny pomysł stworzenia skryptu który będzie ułatwiał przyszłym pokoleniom pracę z minixem.

Z ciekawszych rzeczy:

  • Sam pobierze czysty obraz minixa do zajęć
  • Będzie automatycznie montował obraz w katalogu roboczym (łatwa modyfikacja plików!)
  • Będzie tworzył kopie zapasowe obrazów i umożliwiał powrót do wcześniejszej wersji
  • Pozwoli na wyeksportowanie zmian do zip’a
  • Pozwoli przenieść aktualny obraz na pendrive’a
  • I wiele wiele innych

Działa (przynajmniej powinien) pod linuxem, testowałem na Ububtu.

Skrypt + Instrukcja:

https://github.com/peku33/minix-toolkit

phpMyAdmin Automatic Update script

Today I present you my latest project – script for automated update of phpMyAdmin

From README.md:

Requirements – basic linux commands

  • bash
  • wget
  • unzip
  • mktemp

Usage:

  1. Download phpMyAdmin_Update.sh
  2. chmod +x ./phpMyAdmin_Update.sh
  3. ./phpMyAdmin_Update.sh <phpMyAdmin directory>

This simple script will:

  1. Download and unpack latest phpMyAdmin (zip) into temporary directory
  2. Remove _old and rename to _old
  3. Move downloaded phpMyAdmin to
  4. Copy config.inc.php from _old to
  5. Done

Project on GitHub: https://github.com/peku33/pma-update