blog.darkstar.work - a simple url encoder/decoder

 a simple url encoder/decoder
 http://blog.darkstar.work

Labels

Wirtschaft (150) Pressefreiheit (125) Österreich (120) IT (95) code (60) Staatsschulden (37) EZB (27) Pensionssystem (16)
Posts mit dem Label code werden angezeigt. Alle Posts anzeigen
Posts mit dem Label code werden angezeigt. Alle Posts anzeigen

2022-09-25

Bridge Mini-VM for reading XFS, JFS, ext[234], minix, btrfs, reiserfs ot any other non MS filesystem

Howto access  XFS, JFS, ext[234], minix, btrfs, reiserfs ot any other non MS filesystem from Windows 7 - 11 without installing a maybe bogus kernel filesystem driver?

  1. Make a Mini-Vm with a totally slack and stripped linux kernel, that is bridged on a VM network adapter. Include all filesystem drivers and needed network adapter & drivers in that kernel and strip / kick out everything other, what's not needed. 
    Make the kernel similiar to a cisco router or PIX firewall kernel.
  2. Give the VM direct access to your harddisk, usb-devices, firewire & bluetooth devices.
  3. Enable the Mini linux VM to reEXport mounted filesystem over smb or nfs.
  4. Calculate the memory size, which is needed, that all filesystem mounts and all fs operatons work fast enough with paging and caching. 
  5. Choose the best scheduler for that mini-VM.
  6. Optimize all ioctl, (f)lush, (f)read, (f)write, (f)seek, (f)open, (f)close and all other filesystem operations.
  7. If you are hungry => oprimize the /proc /sys /dev filesystem.

2022-05-08

A crazy example of a Lazy singleton as strangest singelton pattern ever

A crazy example of a Lazy<T> singelton with privat constructor inherited form an protected DoubleLockInstance singelton with private empty and protected parameter constructor inherited form an abstract singelton template with protected constructor.


Application settings example:


BaseSets for basic settings as abstract singelton base


using System;using System.Reflection;
namespace work.darkstar.blog{    /// <summary>    /// abstract class BaseSets     /// </summary>    [Serializable]    public abstract class BaseSets    {        public string AssemblyName { get => Assembly.GetExecutingAssembly().GetName().ToString(); }        public string Copyright { get => "GNU LIGHT GENERAL PUBLIC LICENSE 2.0 LGPL"; }        public virtual string AssemblyCom { get => "darkstar.work"; }
        public virtual int AppId { get; protected set; }        public virtual string AppName { get; protected set; }        /// <summary>        /// protected empty constructor for inheritable singelton        /// </summary>        protected BaseSets() { }         /// <summary>        /// protected parameterized constructor for inheritable singelton        /// </summary>        protected BaseSets(int appId, string appName)        {            AppId = appId;  AppName = appName;        }    }}

AppSets for application settings as instancable singelton default app sets (settings):

using Microsoft.Win32;
using System;
using System.Reflection;
using System.Windows.Forms;

namespace work.darkstar.blog
{
    public interface IAppSetsDomain : IAppDomainSetup    {        System.AppDomain AppCurrentDomain { get; }    }    /// <summary>
    /// application settings singelton    /// </summary>
    [Serializable]    public class AppSets : BaseSets, IAppDomainSetup
    {
        
private static AppSets _appSets;
        private static object  _initLock, _sndLock;
        protected static AppSets DoubleLockInstance {            get {                _sndLock = new System.Object();                lock (_sndLock)  {                    if (_initLock != null) _initLock = null;
                    if (_initLock == null) _initLock = new System.Object();                    lock (_initLock) {                       if (_appSets == null)                            _appSets = new AppSets();                    }                    return _appSets;                }            }        }        public string CodeBase { get => Assembly.GetExecutingAssembly().CodeBase; }
        public string BaseDirectory { get => AppDomain.CurrentDomain.BaseDirectory; }        public string AppDataPath { get => Application.CommonAppDataPath; }        public RegistryKey AppDataRegistry { get => Application.CommonAppDataRegistry; }

        #region implementing interface IAppSetsDomain, IAppDomainSetup        
        public AppDomain AppCurrentDomain { get => AppDomain.CurrentDomain; }
        public string ApplicationBase get set; }
        public string ApplicationNameget set; }
        public string CachePathget set; }
        public string ConfigurationFileget set; }
        public string DynamicBase get set; }
        public string LicenseFile get set; }
        public string PrivateBinPath get set; }
        public string PrivateBinPathProbe get set; }
        public string ShadowCopyDirectories get set; }
        public string [] ShadowCopyDirectoryArray { 
                get => ShadowCopyDirectories.Split(';'); }
        public bool FilesShadowCopy { get set; }
        public string ShadowCopyFiles { 
            get => FilesShadowCopy.ToString().ToLower();
            set { FilesShadowCopy = Boolean.Parse(value); }
        }
        public bool FilesShadowCopyget set; }
        public string ShadowCopyFilesget => FilesShadowCopy.ToString() set; }
        #endregion implementing interface IAppSetsDomain, IAppDomainSetup        

        /// <summary>        /// static constructor         /// </summary>        static AppSets() {
            
_initLock = new System.Object();
            
lock (_initLock) { _appSets = new AppSets(); }
        }
        /// <summary>        /// private empty constructor         /// </summary>        private AppSets() {            AppId = AppDomain.CurrentDomain.Id;            AppName = Assembly.GetExecutingAssembly().FullName;                      }
        /// <summary>        /// protected parameter constructor         /// </summary>        protected AppSets(int appId, string appName) : base(appId, appName) { }
    }}

Sealed MyAppSets for application specialized appSets as Lazy<T> singelton:

using System;
using System.IO; using System.Security;
/* ... */using Microsoft.Win32;/* ... */using Windows.Forms; namespace work.darkstar.blog { /// <summary> /// my application settings singelton /// </summary> [Serializable] public sealed class MyAppSets : AppSets { /// <summary> /// private static readonly Lazy<T> self containing private real singelton unique instance /// </summary> private static readonly Lazy<MyAppSets> _instance = new Lazy<MyAppSets>(() => new MyAppSets(AppDomain.CurrentDomain.Id, "LazyApp")); /// <summary> /// static instance getter for Singeltion /// </summary> public static MyAppSets Instance { get => _instance.Value; } public string UserAppDataPath { get => Application.UserAppDataPath; } public RegistryKey UserAppDataRegistry { get => Application.UserAppDataRegistry; } /// <summary> /// private constructor with partameters for sealed unique singelton /// </summary> private MyAppSets(int appId, string appName) : base(appId, appName) { } /// <summary> /// Gets name value pair for application registry key saved in registry scope for current user /// </summary> /// <param name="regName">registry name identifier</param> /// <param name="subKey">subKey in scope of current user</param> /// <returns>object value</returns> /// <exception cref="ApplicationException">application exception with detailed inner exception</exception> public object GetUserRegValuey(string regName, string subKey = null) { object o = null; RegistryKey key = null; Exception ex = null; try { key = (subKey == null) ? UserAppDataRegistry : UserAppDataRegistry.OpenSubKey(subKey, false); o = key.GetValue(regName); } catch (SecurityException sex) { ex = sex; } catch (ObjectDisposedException odEx) { ex = odEx; } catch (UnauthorizedAccessException uaEx) { ex = uaEx; } catch (IOException ioeEx) { ex = ioeEx; } finally { if (key != null && subKey != null) key.Close(); if (ex != null) throw (new ApplicationException("Error accessing registy key: " + $"{UserAppDataRegistry}\t name: {regName}\t subkey: {subKey}", ex)); } return o; } /// <summary> /// Set Value for UserAppDataRegistry /// </summary> /// <param name="regName">registry name </param> /// <param name="value"value to set></param> /// <param name="subKey">subKey</param> /// <returns>void means nothing</returns> /// <exception cref="ApplicationException">application exception with detailed inner exception</exception> public void SetUserReg(string regName, object value, string subKey = null) { RegistryKey key = null; Exception ex = null; try { key = (subKey == null) ? UserAppDataRegistry : UserAppDataRegistry.OpenSubKey(subKey, true); key.SetValue(regName, value); } catch (Exception anyEx) { ex = new ApplicationException($"Error setting value=" + $"{value} for name={regName} inside registry key: {key.Name}", anyEx); } finally { if (key != null && subKey != null) key.Close(); if (ex != null) throw ex; } } } }

Accessing MyAppSets singelton inside any entity, framework,  helper, [...] class


using System; /*  ... */
using work.darkstar.blog;

public class MyEntity : IAppSetsDomain {
  /* [ ... ] */
  /* [Inject] */
  /* [ ... ] */

  public AppDomain AppCurrentDomain {
    get => MyAppSets.Instance.AppCurrentDomain;     set => MyAppSets.Instance.AppCurrentDomain = value;   }   /* ... */ }

2022-03-28

some ideas to Azure & Microsoft SQL Servers [Draft]

What is missing?

It's missing, that we have unfortunatley no consistently implementation for Active Directory (see also: LDAPS, X.500) on Micrsoft SQL-Server.

How fast are Linked Servers & Distributed Transaction coordinator

Trust me, they are really fast and OAUTH and Azure Auth would be implemented in some weeks, if MS put some lower evangelists at work!

To be continued ...

 

2021-12-29

Most bogus random generator service for linux

try it here: https://darkstar.work/mono/fortune/od.aspx
on PasteBin: https://pastebin.com/6wfzR9NE

#!/bin/bash nanos=`date +%N`; secIGSO=`date +%s` cursec=`date +%S` randomseek=`echo "$secIGSO - $nanos" |bc` urandomseek=`echo "$randomseek % 65536" |bc` readbytes=`echo "$cursec + 32" |bc` echo -en "\tsince_1970-01-01.secs:\t$secIGSO \n\tcurrent.nanos:\t$nanos \n"; echo -en "\trandomseek:\t$randomseek \n\turandomseek:\t$urandomseek \n"; echo -en "\tcursec:\t$cursec \n\treadbytes:\t$readbytes \n"; echo "exec od -A n -t x8 -w32 -j $urandomseek -N $readbytes /dev/urandom" od -A n -t x8 -w32 -v -j $urandomseek -N $readbytes /dev/urandom

vim urandomseed bash

notepad++ urandomseed

2021-11-11

How to install LineageOS on Alcatel1 (5033D)

0. Attention: You can destroy or brick your phone totally, if something went wrong.
Unless you don't exactly know all fundamentals about android adb, fastboot, boot process and slot A/B, please don't do this:

1. install adb and fastboot on your linux or windows system

2. Enable developer options by clicking 5x times on build number in system settings

3. enable USB debugging and unlock OEM in developer options and debugging options after you became a developer

4. follow now the instructions here to unlock your phone:
https://www.techdroidtips.com/unlock-bootloader-alcatel-1/

5. Download LineageOS either from:

5.1 Andy Yan's personal builds, e.g.: LineageOS16 OR

5.2 github phhusson    OR

5.3 My Google Drive (You can find all diskdump images directly here)

6. connect your Alcatel1 to your PC

7. now use "adb devices -l" to see, if android Alcatel1 is present 

7.1 if you use Andy Yan's personal builds or phhusson github, then "adb reboot recovery"
      Wait until recovery mode is ready, then

  • Wipe cache first
  • Wipe data / factory reset next
  • enable adb next
  • load image from adb
  • Under Windows or Linux type "adb sideload lineage-1*.img" 
7.2 if you are using my img files from diskdump folder, you can
  • modify the images by mounting them with 'mount -o loop path2image/file.img /mnt' under linux
  • now you can modify e.g. the loopback mounted system.img for your own purpose.
  • flush, sync and then 'mount -o remount,ro  /mnt
  • look if all modifications are done well and then 'umount  /mnt
  • now use adb shell to reboot to bootloader by "adb reboot bootloader"
  • yet use "fastboot flash system path2image/system.img



2021-10-05

Draft: Idea a multiple device dark net (.onion) cloud

 We've Azure Cloud with microservices, we have amazon cloud, with finest virtualization, but both are companies under patriot act and safe habor agreement. Some months / years ago, there where a lot of tor (dark net) bridges and endpoints in both of those clouds, but if the stock owners decide to prevent TOR in future, you're totally pissed on and you have no legal ability against that.

So lets build a onion scalable cloud, that uses each device with less CPU load and some SSD or similiar fast disk, to build a docker / virtual machine dark net cloud.

Some onion router urls

DuckDuckGo https://3g2upl4pq6kufc4m.onion/

http://xmh57jrknzkhv6y3ls3ubitzfqnkrwxhopf5aygthi7d6rplyvk3noyd.onion/cgi-bin/omega/omega

Dark Web ;Magazine https://darkwebmagazine.com/

The hidden wiki http://rhw7r43c2id7org7d35jj5r4mu377npfed23qgic2qr2tvh743lgohid.onion/^

New York Times https://www.nytimes3xbfgragh.onion/

CIA http://ciadotgov4sjwlzihbbgxnqg3xiyrg7so2r2o3lt5wz5ypk4sxyjstad.onion/

Hidden Forum http://hiddenuip5qlthdkbeqrpcfja4k5qr5urordvm4sm3gnz6wcy7yo5qqd.onion/forum

Comic Book Library http://nv3x2jozywh63fkohn5mwp2d73vasusjixn3im3ueof52fmbjsigw6ad.onion/



2021-09-29

Heinrich Elsigan AGB


Firmenname

Heinrich Georg Elsigan

GLN

9110005479907

Addresse

Theresianumgasse 6/28, 1040 Wien

UID-Nummer

ATU72804824

Rechtsform

Einzelunternehmer

GISA-Zahl

30065758

 


  1. Umfang der Allgemeinen Geschäftsbedingungen

    1. Die Allgemeinen Geschäftsbedingungen unterliegen der EU-Grundrechte Charta und der Gewerbeordnung.

    2. Jede einzelne Leistungserbringung muss in einem neuen dafür vorgesehen Vertrag vereinbart werden, Ausnahmen gelten hierfür nur für 10 Stammkunden innerhalb der Europäischen Union und des Vereinigten Königreichs (UK).

    3. Weitergabe der Leistungen an dritte oder vervielfältigen der auftragsgefertigten Software des Unternehmens erfordern eine explizite Klausel in einem schriftlichen Vertrag, sofern sie per GPL (Gnu General Public License), Apache License oder einer anderen üblichen Open Software Lizenz lizenziert wurden.

    4. Der Unternehmer bevorzugt per se Open Source und die GPL und öffentliche GIT Source Verwaltung Repositories, einige seiner Kunden haben explizit bei Auftragserteilung auf © (Copy Right) und Closed Source bestanden.

    5. Sollten Bibliotheken. Funktionen, Text- und Bildelemente aus bestehender unter der GPL lizenzierten Software in ein neues Projekt unter einer nicht offenen Lizenz wiederverwendet werden oder aus anderen Projekten einer Open Source lizenzierten Quelle stammen, bleiben diese Komponenten natürlich weiterhin Open Source und müssen vertragsgemäß nach GNU General Public License verwendet und  bei Anfrage darüber Auskunft erteilt werden. Bei einem gerichtlichen Streitfall hat die Open Software Foundation und andere GNU Institutionen hier möglicherweise Rechtsansprüche.


  1. Spezielle Konditionen

    1. Da der Unternehmer seit 2008 an einer schizoaffektiven Störung leidet und dadurch partiell gehandicapt ist, bedarf es einer expliziten Vereinbarung, sollte die Leistungserbringung außerhalb der gewohnten Umgebung oder des Standorts Europa, bzw. Vereinigtes Königreich und beauftragt werden.

    2. Jegliche Ton- und Bildaufnahmen von der Arbeit des Unternehmers erfordern explizite notariell beglaubigte Verträge aufgrund des Handicaps des Unternehmers.

    3. Anwendung oder Installation von Filtern bei der elektronische Kommunikation (TCPIP z.B. http Filter) oder in das OS eingebaute Anzeigefilter, die ohne rechtliche schriftliche Verträge, mit Heinrich Elsigan Einzelunternehmer durch Dritte (Internet Service Provider oder Betriebssystem Hersteller) sind per se nicht erlaubt.

    4. Direkte Überwachung des Bildschirms, jeglicher anderer Ausgabegeräte, sowie der Tastatur, Maus und anderer Eingabegeräte während der Arbeit des Unternehmers durch Auftraggeber. Internationale Organisationen erfordern notariell beglaubigte Verträge.






2021-03-31

Semantic web lost in history / herstory around 2010, how to reactivate it & a short contract use case

Current hypes, trends and pushed business models at 2020

Let's take a short look at the current hypes, trends and pushed business models for companies:

  1. IOT (Internet of things), Industry 4.0
    Machines, units, etc. know and probably send their own status at manufacturer, service center, at home or somewhere else over the rainbow (in case of  ugly DNS injection, warped rouing tables [OSPF, BGP] ot men in the middle [squid bump, bluecoat, ...]).
    Those units normally,communicate when they need maintenance, when components soon needs to be replaced, when physical, technical or environmental critical limit reached, when subsystems fail or completley shut down, when the user when the customer operates it improperly or negligently, simply report in intervals that they are alive and everything's OK, , etc

    We can find a lot of use cases for many useful applications here, added value / surplus is often small but still useful! Problems with security, flood of data, extracting relevant events and, above all, reacting to the corresponding message are the challenges here.

  2. Cloud
    I like the cloud, but sometimes cloud feels cloudy, cloudier, obscure dust and smog over keywords and hypes and real hard technical features that generate great customer surplius and real cash or quality of business benefits.

    What are the most common problems, pitfalls and misunderstandigs with any cloud?

    • Lack of specific customer requirements and inaccurate, exact technical specifications from the cloud provider.

      Practical example (what I really need and I'm thinking about right now):
      I need to implement a state service, that saves current game status of small multiplatform games (e.g. card game schnapsenarchon clone, SUPU) in the cloud. If I play on my  android tablet or smartphone, the current state and course of the game will be transfered to a cloud servie, persisted in a cloud storage or database and if I continue playing on Windows desktop, the last state of the game is automatically fetched from the cloud and the game application sets that game state and transferred back to cloud after the next move.

      For my purposes the cheapest way will be sufficient:
      A simple Amazon Linux 2 AMI (HVM), SSD Volume, Type t2.nano, t2.micro or t2.nano with a simple SQL-Database (no matter if hackish install at virtual imaage or the smallest Amazon DB instance) with somekind of open source PHP Swagger API, like https://github.com/andresharpe/quick-api

      With similar requirements, some developers and most managers are probably unsure whether to use Amazon ElasticCache or some kind of Session State Server ported to Azure SQL  or entirely another not well known cloud service.

      Even fewer people (including myself) know what the exact technical limits of the individual services are, e.g. the exact performance and scalable elasticity of Anazon Elastic Cache and when scalability of Amazon Elastic Cache is completely irrelevant, since the network traffic and the network data volume will always be the bottle neck in that specific scenario.

    • Nice advertising slogan, but poor performance and poorly configurable options from drive and storage providers, no standard network mount (like SMB or NFS), but a lot of cloudy magic.
      When I look at the beautiful Google Drive and Microsoft One Drive, I immediately see that this is not a classic network file system mount under my point of understanding.
      Reading and writing large blocks or deep recursively nested directory trees is extremely slow.
      I also didn't find an option to have an incremental version history backup created after every change (Create, Delete, Change) to the Cloud Drive or at least simply midnight-generated backups for the last 3 months at low cost.
      Options like synchronizing parts of the Cloud Drive locally create horror nightmares.
      In 1997 we booted an NFS from the USA via Etherboot with real-time DOS and debugged faster Doom Clones and other 3D games in C ++ with some ASM routines and the network performance didn't fail.

    • Difficulty finding the most suitable service in Cloud Djungel. Real technical comparisons between the hard facts and the possibilities of the individual cloud services have so far mainly published by free bloggers, e.g. AWS Lambda vs Azure Service Fabric
      Decisions are more based on creeds (we have a lot of .NET developers, so we'll use Azure, I mah strong Amazon-like power women and Linux, so I'll use Amazon).



Lets go back to RDF in the years 2010 - 2015 

You probably know what semantic web, owl, rdf, machine readable & understandable data are, right?

If not, then here is a little bit of reading:
https://www.w3.org/TR/rdf-mt/
https://www.w3.org/TR/2010/WD-rdb2rdf-ucr-20100608/
https://en.wikipedia.org/wiki/RDF_Schema

What does 'going back in time' mean in a large scope and broader sense?

Before all the new trends, there was an attempt to realize semantic web, e.g. RDF as an XML extension with semantic machine-understandable properties.

When we as human beeings read a website or analyze BIG data, we automatically recognize the context, perhaps the meaning and probably the significance of this data.

Machines can't do that, they didn't have a semantic understanding until now.

Information theory distinguishes between 3 levels of information:

  1. Syntax level (compiler construction, scanner, parser, automata & formal languages, extended grammar, e.g. https://en.wikipedia.org/wiki/Context-free_grammar
  2. Semantic level (meaningful reading by people, putting things into context, understanding contexts).
  3. Pragmatic level (goal-oriented action based on information by recognizing the meaning at the level of semantics).

I assume / postulate:

=> If computer programs reach 2. semantic level => then we are a big step closer to AI realization.


Why computer programs can't already implement semantic understandig? 

Theoretically and also practically in terms of technical frameworks, computer programs are already able to understand semantically data.

The concrete problem is here, that too little data are provided in a semantically machine-readable form and a standardized (META-)language.

Example: Regardless of whether Statistics Austria, Open Data GV or ECB, etc, certainly provide very good statistics, but none of them provide semantic machine-readable data.

Somebody has to make here a  larger startup, to transform already provided common and needed statistics public data in semantically machine-readable form.


What does that actually bring in return of short time invest?

Not so much immediately!

What could be the fruits in mid-term or in the long tail?

A lot, because when more and more public open data are availible in a semantic machine readable language, programs can also bring some of them in association and we'll be able to implement meta relational AI rules then.

Use case contracts

Semantic programs doesn't only mean mass data fetching and putting them into relation. 
Semantic programming could also in principle support any very formal business process, e.g. contract management for

  • employment contracts
  • supply contracts
  • service provider contracts
  • insurance contracts
  • bank contracts 
  • and all the contracts that people sign with just one click on a checkbox (which they usually do not know that this is a legal contract consent).


All clear and understandable so far?

I got this idea when I was looking and inspecting the adopted amendment to the laws and newly passed laws by the democratic republic of Austria and I wanted some semantic automated statistics for some use cases. 

For details look at post https://www.facebook.com/heinrich.elsigan.9/posts/156458906318533
or read the post copy below: