Latest Threads

Forum Statistics
  • Forum posts:1 160
  • Forum threads:183
  • Members:1 350
  • Latest member:bagnallhauss


Posted by: Ashus
7.3.2017 04:15
Forum: Guides / Návody
- No Replies

Use iframe like this!


Code:
<iframe id="unstyled-text" sandbox="allow-scripts allow-popups allow-same-origin" srcdoc="<?= htmlspecialchars('<head><base target="_blank"></head><body>' . $html . '</body>') ?>"></iframe>
<script>
    $(function(){
        // hack for IE and browsers without srcdoc support
        var $u = $('#unstyled-text');
        var $body = $u.contents().find('body');
        if ($body.html() == '')
            $body.parent().html($u.attr('srcdoc'));
    });
</script>

Print this item


Posted by: Ashus
14.9.2016 10:39
Forum: Guides / Návody
- No Replies

Provided you have jQuery, open you dev. tools, adjust the window to designated dimensions and put this to the console in your browser:

Code:
$(':visible').each(function(){var w = $(this).outerWidth(); if (w<=360) return; console.log(w, this)})

You can adjust the 360 px number to any number you need for your breakpoint.

Print this item


Posted by: Ashus
23.6.2016 12:42
Forum: English
- Replies (2)

I'd like to just inform any potential Ford V code radio owners, that the service ukbookshelf.co.uk for retrieving lost or never owned radio codes indeed works.
I sent my 3.95 GBP and on Saturday morning the code arrived as promised. And it worked just fine.

Print this item


Posted by: Ashus
13.12.2015 11:05
Forum: Bash scripts
- No Replies

The script and idea was based on jhnphm's post here.
The idea is to assign client's DUID addresses (IPv6) just like MAC addresses for IPv4 to the config file. The prerequisite is to have odhcpd configured and IPv6 prefixes filled for DHCP clients via LuCI. Since the DUID is required for static IPv6 to work and there are no fields in LuCI, you can use the script after the client is seen for the first time (probably configured dynamically).

Code:
#!/bin/sh

for I in $(uci show dhcp|awk -F '(\\[|\\]|\\.|=)' '{if ($2=="@host" && $5=="name") print $6}'); do # find existing static host entries and find hostnames
    NAME=$(echo -ne $I | sed -r "s/'//g")
    DUID=$(cat /var/hosts/odhcpd |awk -F ' '  "{if (\$1 == \"#\" && \$5 == \"$NAME\") print \$3 }"|head -n 1)  # find duid for existing hostname in leases
    ID=$(uci show dhcp|awk -F '(\\[|\\]|\\.|=)' "{if (\$2==\"@host\" && \$6==\"$I\") print \$3}") # Find placement of host entry
        if [ "$DUID" != "0000000000000000000000000000" ]; then
                echo Found: $NAME = $DUID
                uci set dhcp.@host[$ID].duid=$DUID # Set DUID
        fi
done
echo Commiting changes.
uci commit
killall -HUP odhcpd

Print this item


Posted by: Ashus
15.8.2015 09:04
Forum: Guides / Návody
- Replies (1)

At first I thought about creating a file synchronization tool in PHP myself, but then I read about synchronization and it looked like I'd have to spend a whole lot of my time fixing some special cases, so I googled more and found about SparkleShare. The main advantage is that it can use your own server - no data are sent to clouds (NSA), all data are on all PCs, not just opened remotely on the server (or in some cache).

SparkleShare


You can create a GIT repository on your own linux server using included dazzle tool. This tool installs GIT if needed, creates a new user storage for this purpose and adds authorized keys created on client machines. It can also add more trusted key fignerprints - more clients. And finally it creates shares (projects). After a share is created, you can "mount" it on your client machines. SparkleShare watches for changes and after they are saved completely, they are automatically transferred to the server.

Now for the fun part.. download and install Link Shell Extension and use hardlinks to mirror requested config files to app data locations. On other machines, remove the current config files and create hardlinks to the mounted locations. The only downside is you can't synchronize Windows registry changes, so if you plan to synchronize eg. PuTTY, you need to use a portable version, that exports registry to REG file when the app is closed. IMO small apps like PuTTY portable can be mirrored whole, not just the reg file; also the updates are pretty easy - you just update once and other machines are updated as well.

Print this item


Posted by: Ashus
27.7.2015 10:34
Forum: Webové stránky a aplikace
- No Replies

Malá responzivní aplikace pro záznam časů při práci. Automaticky sčítá časy a data ukládá při změně na server (pro případ pádu pracovní stanice). Dvojklikem se rychle doplní aktuální čas.

Technologie: PHP, JS - AJAX, Webnotification

   

https://ukoly.kafemlynek.cz/

Print this item


Posted by: Ashus
27.7.2015 10:14
Forum: Webové stránky a aplikace
- No Replies

Založeno na vlastním frameworku AshusRS vyvíjeném primárně pro tento web a používaný i pro další weby.
Redakční systém je psaný bez chyb v režimu strict (E_ALL), pro nové verze PHP (5.5+), bez hloupých děr a s maximálním možným zabezpečením při přenosu dat.
Optimalizováno pro SEO, uspokojení Google Pagespeedu a dalších analytických nástrojů.
Obsahuje množství modulů (zatím 7) a další přidávám podle potřeby.
Některé zajímavé klíčové fráze najdou oba hlavní vyhledávače Google a Seznam již na první stránce.
Implementováno vlastní řešení přihlášení přes třetí stranu (identifikace a autorizace na ashus.net) namísto univerzálních hesel, hesla uživatelů jsou pak solena konstantou i proměnnou.
Vzhled byl původně převzat z Wordpressu a upravován se zachováním responzivity pro mobilní zařízení. Téměř čtvrtina návštěvníků přichází z mobilů Wink

   

https://www.marcelasilber.cz/

Print this item


Posted by: Ashus
27.7.2015 09:54
Forum: Webové stránky a aplikace
- No Replies

Systém pro hledání restaurací v okolí s funkční geolokací z mobilu pod záštitou ostravské webhostingové společnosti Banan.cz.

Technologie: PHP, MySQL, JavaScript+jQuery

   

http://www.nekuracke-restaurace.cz
v rámci Banan.cz

Print this item


Posted by: Ashus
27.4.2015 12:11
Forum: Other
- Replies (37)

An extension for phpBB 3.1 that allows administrators to easily add their Google AdSense ads after first post in topic display details.

Modified from this extension: Google Analytics from phpBB team
Thanks guys.


Quick Install


You can install this on the latest release of phpBB 3.1 by following the steps below:

  1. Download the latest release
  2. Unzip the downloaded release.
  3. Copy the `ashus` directory to `phpBB/ext/ashus/` (if done correctly, you'll have the main composer JSON file at (your forum root)/ext/ashus/adsense/composer.json).
  4. Navigate in the ACP to `Customise -> Manage extensions`.
  5. Look for `Google AdSense` under the Disabled Extensions list, and click its `Enable` link.
  6. Set up and configure Google AdSense by navigating in the ACP to `General` -> `Board Configuration` -> `Board Settings`.

Uninstall


  1. Navigate in the ACP to `Customise -> Extension Management -> Extensions`.
  2. Look for `Google AdSense` under the Enabled Extensions list, and click its `Disable` link.
  3. To permanently uninstall, click `Delete Data` and then delete the `/ext/ashus/adsense` directory.

Support


License


GNU General Public License v2

Print this item


Posted by: Ashus
7.4.2015 08:31
Forum: Guides / Návody
- Replies (6)

I had a problem the other day.. Android has a protection against malicious apps doing overlay (screen filters, buttons etc); when installing custom APK, you can't press Install button. On my phone I had to install an app to list all apps having the overlay permission, specifically this:

Code:
Advanced Permission Manager
https://play.google.com/store/apps/details?id=com.gmail.heagoo.pmaster
After filtering which apps could do that, I was able to pinpoint the problem app and use Titanium Backup to freeze it (check if it is the guilty one).

I'd be happy if you could share what apps you've found out could do that for others to know.
Thanks.
In my case it was Lux Auto Brightness (1.75) [CM 12.1/Android 5.1]; after I upgraded it, the problem has disappeared (it disables itself automatically when an installation is detected).

Print this item