topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 24, 2018, 04:51 PM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Tuxman [ switch to compact view ]

Pages: [1] 2 3next
1
Living Room / Have you ever walked through a computer?
« on: September 16, 2018, 04:18 PM »

2
DC Member Programs and Projects / ZenTweet is Open Source now.
« on: August 19, 2018, 05:07 PM »
Look, another software from me! This time, it is really, really old and it's in German only... but you can contribute!

I open-sourced ZenTweet, my minimalistic Twitter client for web browsers which has not seen major updates in years, a few minutes ago. I started it in 2014 or so, the current instance is here. As people keep hating Twitter for doing Twitter things, this might be a good moment to notify you that ZenTweet's limited features are not affected by the API changes in the foreseeable future.

Enjoy.

3
N.A.N.Y. 2019 / N.A.N.Y. 2019: logpad for Vim and GNU Emacs
« on: July 29, 2018, 07:04 PM »
Just throwing together my other 2019 applications before writing new ones...

NANY 2019 Entry Information

Application Name logpad
Short Description Writing a journal with Vim and GNU Emacs.
Supported OSes Any which have Vim or GNU Emacs.
Web Page http://www.donationc...ndex.php?topic=45696
Download Link Vim script, GNU Emacs plugin.
System Requirements
  • logpad.vim: Vim.
  • logpad.el: GNU Emacs.
Author me (both)

Description
logpad simulates the Windows Notepad logging behavior by automatically inserting the current timestamp on top of a file which starts with ".LOG".

Features
- Automatically creates a journal for you.

Screenshots


Usage

Installation
- logpad.vim: Download the script file and load it with your preferred package manager (or manually).
- logpad.el: Download logpad via MELPA and start logpad-mode: M-x logpad-mode.

Using the Application
All you need is logpad (or Notepad  ;D) and a file that starts with ".LOG". Everything else is automagic.

Known Issues
The GNU Emacs variant could be more flexible.

4
N.A.N.Y. 2019 / N.A.N.Y. 2019: GDPR Blocking (PHP Edition)
« on: July 29, 2018, 06:56 PM »
Just throwing together my other 2019 applications before writing new ones...

NANY 2019 Entry Information

Application Name GDPR Blocking (PHP Edition)
Short Description One of my usual social comments, this time concerning the GDPR and its consequences.
Supported OSes Any, as long as we have PHP.
Web Page http://www.donationc...ndex.php?topic=45495
Download Link The PHP snippet is available from the website.
System Requirements
  • PHP.
Author Tuxman! Ha!

Description
This is meant to be a free and easy alternative to the various GDPR blocking services which came over the world in 2018. It is a PHP snippet that blocks all visitors from EU IPs.

Screenshots

Your country does not want you to be here.


Usage
Integrate the snippet in your own PHP code.

Uninstallation
Remove the snippet from your own PHP code.

Known issues
Does not catch proxies, of course.

5
N.A.N.Y. 2019 / N.A.N.Y. 2019: The Decision Sieve
« on: July 29, 2018, 06:49 PM »
Just throwing together my other 2019 applications before writing new ones...

NANY 2019 Entry Information

Application Name The Decision Sieve
Short Description A web service that will help you filter your bucket list.
Supported OSes Any, as long as we have a C++17 compiler.
Web Page https://tuxproject.d...ects/decision-sieve/
Download Link https://bitbucket.or.../tux_/decision-sieve
System Requirements
  • It's a HTML site, entirely written in JavaScript/CSS. There are not many systems which don't support that.
Author uhm, yes

Description
Generally spoken, this is a web service that will help you filter your bucket list. If you have a limited budget or you need to limit your shopping to a certain number of things, the Decision Sieve can help you clean up your list to a reasonable amount. I actually wrote it to decide about which whisky to buy - and it helped me a lot.

Features
- Can filter your bucket list.

Screenshots


Usage

Priority Sieve:

- Enter a list of things in your list.
- Optionally, mark a couple of things as "less important" or "more important" using the slider on the right side.
- Enter the maximum number of things that should be left after sieving.
- Press the button and watch the magic happen.

Price Sieve:

- Enter a list of things in your list.
- Specify the particular price for each thing in the list.
- Enter the maximum budget.
- Press the button and watch the magic happen.

Uninstallation
del /S *

Known Issues
I am bad at web design.

6
Just throwing together my other 2019 applications before writing new ones...

NANY 2019 Entry Information

Application Name libvldmail
Version 0.1.1
Short Description A library that can validate e-mail addresses according to RFC 6531 with a fallback to RFC 5321 ff.
Supported OSes Any, I hope.
Web Page http://www.donationc...ndex.php?topic=45118
Download Link None, actually. This is a library, it needs to be integrated with your own applications...
System Requirements
  • You will need a C compiler. Nothing else.
Version History0.1.1 [2018-02-25]:
- Introducing the BREAK_LOOP_FAIL macro. (Thank you, stsc.)
- Improved output of one of the validation messages.

0.1.0 [2018-02-24]:
- Initial version.
Author when in doubt, me

Description
Your friendly e-mail address validation library.

Features
- Can validate e-mail addresses.
- Comes with a test

Screenshots
 ;D

Usage
Using the Application

You can use libvldmail from inside your own applications. :)
Example code (C):

    #include <vldmail.h>
   
    int main(void) {
        /* ... your code ... */
       
        vldmail validator = validate_email(L"foo@bar.quux");
        if (0 == validator.success) {
            /* success == 0 means that something was wrong. */
            printf(L"Validating foo@bar.quux failed: %ls\n", validator.message);
        }
       
        /* ... more of your code ... */
    }

Uninstallation
Just remove it, I guess.

7
Just throwing together my other 2019 applications before writing new ones...

NANY 2019 Entry Information

Application Name remv
Version 1.0.1
Short Description A sane way to rename files/directories with a regular expression.
Supported OSes Any, as long as we have a C++17 compiler.
Web Page http://www.donationc...ndex.php?topic=44941
Download Link Attached in the "website" topic.
System Requirements
  • Binary: Windows.
  • Compile yourself: Any that has a new(ish) Clang compiler set.
Version History
  • 1.0.1  [2018-01-14]: remv deleted files. Oops.
  • 1.0.0  [2018-01-13]: initial release
Author whatever

Description
remv should solve my regular problem of having to recursively rename files according to a regex pattern.

Features
- Renames files and folders.
- Can simulate that as well.

Screenshots

(Sorry - attachments don't currently work.)

Usage
Installation
Unpack the .exe anywhere (or build one wherever you want).

Using the Application
USAGE:
        remv [COMMANDS]
        remv [OPTIONS] <regex> <replacement> [<startpath>]

 OPTIONS (any combination):
        -r      Recurse into subdirectories.
        -d      Also rename directories on the way.
        -s      Sets the start directory to the last parameter
                else, remv will start in '.'.
        -v      Verbose logging.
        -vv     Very verbose logging.
        -n      Dry run - don't modify anything just yet.

 COMMANDS:
        -V      Display the remv version and exit.
        -h      Display this help screen and exit.

 You can use $1, $2 etc. in your replacement strings for back-
 references.

Uninstallation
Delete the executable file. You might want to add its path to your %PATH% if you want easier access.

Tips
Don't.  ;D

Known Issues
It sucks!

8
This will be a lengthy process, I'll update this thread while development goes on.

(Background: I reviewed the Acme text editor a while ago for DC. sam is from what it has evolved. I will also add assorted features from third-party patches to sam, e.g. the color coding from deadpixi's version, and probably leave out some of the more obscure Plan 9 integration features.)

TODO:

  • Mostly recreate the look and feel DONE
  • Implement opening files DONE
  • Implement calling subprocesses DONE
  • Implement all other commands in progress
  • Implement the Edit language TODO

9
General Software Discussion / Listary 6
« on: June 03, 2018, 06:39 PM »
I totally missed that:

Listary 6 will be a complete rewrite and is about to be released "soon" (in a programmer's definition of "soon").
http://discussion.li...-as-of-may-2018/4184

10
Did you know that Windows Notepad can make a journal for you?

A couple of years ago, I wrote a Vim script to simulate this behavior.

Today, I ported it to GNU Emacs (will probably be released in the MELPA repositories soon).

Enjoy.

11
Basic Info

App NameAcme
App URLhttp://acme.cat-v.org/
Supported OSesPlan 9, its forks (9atom, 9front, Harvey OS, JehanneOS et al.) and Inferno; UNIX, Linux and related operating systems are supported through plan9port. There is/was a Windows version called Acme-SAC but it does not seem to work on Windows 10 anymore.
Pricing SchemeThis is free software.
Reviewer Donation LinkGive me virtual money replacements.
Screencast Video URLhttps://www.youtube..../watch?v=dP1xVpMPn8M

Preface:

This is actually both a review and a tutorial. Please don't hurt me for partially ignoring the headline.

Intro:

After the UNIX 7th Edition which almost anything that claims to be "UNIX-like" is either based upon or inspired by had been released, the developers continued to work on it. However, the last three UNIX releases did not see much adoption: Between UNIX Version 7, released in 1979, and UNIX Version 8, released in 1985, the UCB's UNIX distribution BSD had been developed so far that it had more than twice of UNIX's system calls. In fact, the eighth UNIX was basically a reimported version of 4.1cBSD, modified to run on VAX computers.

Neither the 9th nor the 10th (and final) UNIX were ever released as a complete operating system, efforts to work on it were soon stopped in favor of what should have been UNIX's successor for operating systems research, named Plan 9 from Bell Labs, inspired by what was called "the worst movie of all times". (I will not link that.) The developers of Plan 9, mostly being recruited from the UNIX and C teams (among them, Rob Pike and Ken Thompson), continued from what they had: the graphical terminal Blit came in the 8th edition, Mk and the rc shell were there in the last UNIX version as well. Plan 9 tried to complete UNIX's approach of "everything is a file" by introducing the 9P protocol which acted as a replacement for regular APIs (including sockets and other device calls). Using the wikifs layer, even the Wikipedia could be edited as if it was a collection of files on the local machine. (Sadly, this layer does not seem to have been ported to other operating systems yet. edit: There is a FUSE version though.)

Of course, since the 70s were over, the usual computer had a real screen instead of a printer and Apple, Amiga and Atari had successfully taken Xerox's revolutionary input device, the "mouse", out of obscurity by the mid-80s, this was what was considered the best way to interact with a computer: The Plan 9 operating system, including its text editors sam and acme, was developed to be used with a three-button mouse. The designers decided that light blue and light yellow were the best colors to stare at all day, so there was not much to configure. Theming was not a thing.

This is how everything in Plan 9 - and its various distributions - looks like:

acme.png

(This is Acme running in Xming on Windows 10. I'll talk about that in a short while.)

Although Plan 9 did not convince the majority of people just yet, probably because there is no good web browser available for it (but NetSurf is said to be ported soon) and because generations of UNIX, BSD and Linux people, including me, have bragged about the efficiency of being able to use a keyboard for everything, some of its ideas (virtual filesystems, its text editors, ...) were made available to other operating systems. "Plan 9 from User Space", not a bad pun in my opinion, works on most systems - excluding Windows. But after some time spent with Acme on a different system, I want to try it on Windows as well.

The tutorial part begins.

Installing Acme on Windows 10:

Windows 10 has got support for being used as a host system for Linux applications as of today. I do not like Linux, but this is the least inconvenient way to use Acme on Windows. What we need is both an X server (Xming is still good enough, install and start it before continuing) and a Linux distribution running on the Windows NT subsystem. I chose to install the "nightly" version of plan9port via Debian. Here's how to install it. In theory, you could run any Debian desktop application with this combination now, but let's stick to the topic here.

When the Debian installation is completed, start the bash (while I prefer the csh, Windows itself only comes with a native bash.exe) and install the essential build tools:

$ sudo apt-get install build-essential xorg-dev git

If you happen to be stuck behind a proxy and the above command fails to connect to the servers, add the following text to your ~/.bashrc file (a number of editors are already installed, including nano and a version of Vim as vi):

export http_proxy=http://your.proxy:port
export https_proxy=http://your.proxy:port

Now grab and build the Plan 9 tools:

$ git clone https://github.com/9fans/plan9port.git
$ cd plan9port
$ ./INSTALL

This will take a while - not too long though. The relevant utilities will be inside /home/USERNAME/plan9port/bin then. You can reach the / folder from Windows as %localappdata%\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4\LocalState\rootfs\, but that will not help you much: Those are Linux binaries. (But it might or might not be a good idea to hardlink your ~ directory to where you can access it more easily.)

Prepare your bash to find both acme and your X server - add to your ~/.bashrc file:

PLAN9=/home/USERNAME/plan9port export PLAN9
PATH=$PATH:$PLAN9/bin export PATH
export DISPLAY=:0

Now you have two options in order to see the glory of Acme for the first time:

1. Restart your bash and type acme &.
2. Make a desktop shortcut for Acme which you could also pin to the taskbar and/or the start menu if you want to.

I find the second option to be notably more convenient. The command for the shortcut is:

powershell -windowstyle hidden -command "&{ bash -ic acme }"

The -i flag is important since you'll definitely want to read your .bashrc file before trying to start Acme. - As far as I could see, there is no easier way to do that without having a terminal window open all the time. Maybe Microsoft will improve this in the future.

How to use (the basics of) Acme?

The blue part on top of your Acme window contains commands ("tags") like your usual toolbar does. It is editable (I'll explain why - just read on). Middle-clicking "New" opens a new text window, "Newcol" adds a new column where you could open even more text windows. The square in the top left corner allows you to change the size of each window. By default, the text you are writing is not assigned to a file name. If you want to save it to a file, move your mouse cursor to the top left corner of your text window and write down the path. A new item named "Put" will appear in your tagline. Middle-click it to save the file. If you want to open any file instead, write down its path anywhere and right-click it. (Obvious, isn't it?) The "Putall" command will save all modified buffers which have assigned paths, by the way.

Note: Since we are in an emulated environment here, "C:\" is actually "/mnt/c". This might be important when dealing with your files.

You can either use the particular tags or - the recommended way - mouse chords for cutting, copying ("snarfing") and pasting text. Consult the documentation for a general overview. There are six keybindings, mostly inspired by Emacs's, but that's about it.

One more note: Your up/down cursor keys won't work. Use the mouse to move between lines. Scroll down to "The Good" for more surprising features.

Let us come back to the usual review now.

Who is this app designed for:

Freaks. ;D Also, Acme is an awesome developers' editor because of its near-perfect interaction with the operating system. No, it does not have syntax highlighting. Do you really need that though? Third, if you are one of those who think a mouse does not make you work any faster (or you want to convince someone of either the keyboard or the mouse), Acme could help you. Or disturb you. Or them.

The Good

Everything in Acme is text. Even the "toolbar" is text. You can not only remove existing commands (although they'll reappear), you can also add your own ones; in fact, Acme is its own command shell. You can see one example on my screenshot from above: Type a command, middle-click it and it will be executed. By default, the output appears in the "+Errors" window, but you can also inline the output by prefixing the command with a pipe.

|date

Middle-clicking that will print the current date at the cursor position. Since you probably don't want to have "|date" appear in your actual file, you can use the tag bar for that: Hover your mouse over the second bar (the one that ends with "Delcol") and enter "|date" there.

acme-bar.png

Middle-clicking it does exactly what you think it does. You can use any command there, including text manipulation commands and compilers.

Interestingly, that works in both directions. Do you remember that I have mentioned the 9P protocol in the Intro section which allows Plan 9 applications to talk to each other? Since we have installed the whole plan9port package (you did follow my instructions, right?), we can access our currently running Acme instance from Windows with the 9p command. To see what I mean, open a command prompt via cmd or something (or you could use the bash directly, but that needs no further explanation):

C:\> bash -ic "9p ls acme"

The most interesting part is behind the numbers. Each number is assigned to one text window inside your running Acme instance. You can read what is typed there by extracting the "body":

C:\> bash -ic "9p read acme/3/body"

This will print what you see on the screen in the window with the ID "3". Spooky? Not yet! You can also write into it, e.g.:

C:\> bash -ic "echo 'Hey DonationCoder!' | 9p write acme/3/data"

That will insert "Hey DonationCoder!" at the cursor position in the window with the ID "3". 8) Basically, you can control every aspect of Acme - including its tag bars, of course - using any programming language which is able to print text on the screen. This is both weird and amazing and there is no reason why no other IDE does that. Since you can control anything inside Acme from outside Acme, you could use that to write a shell script that formats your source code as well.

The needs improvement section

  • The look. I like the colors (I have set up my Emacs to use them), but I would like to have a better default font than what comes with plan9port.
  • I really want to have a native Windows version of Acme because using /mnt/c/... breaks my workflow. Mimicking 9p on Windows could be quite a huge task though... probably that's why nobody has done that yet.
  • Added: Acme does not support file/directory names which contain a space character yet. This is a known bug, it will probably be fixed.

Why I think you should use this product

Try something new? Dive into history? Show off your weirdness to your friends? Do nerdy things with nerdy software? Acme has it.

How does it compare to similar apps

Ha! Hahahaha! Haha!

Oh, well... there actually are some. A number of people have written Acme clones (usually with some Vim thrown in) for various operating systems, including "Acme for Vim":

https://github.com/driusan/de
https://c9x.me/edit/
https://github.com/p...e/plan9-for-vimspace

(Could be continued.)

I haven't spent much time with those yet, but none of those seems to have been developed with Windows in mind, so none of those is able to work around the "Needs improvement" part, at least not the standalone ones. Someone should really change that.

Added: There actually is a reimplementation of (some of) Acme minus the 9P part which might or might not be interesting for those who want to try new things:
https://github.com/as/a

Conclusions

I feel dizzy.

12
DC Member Programs and Projects / GDPR Blocking (PHP Edition)
« on: May 04, 2018, 05:27 AM »
There is an expensive web service that makes your website GDPR-compliant by adding a JavaScript that redirects visitors from the EU to an error page.

This is my attempt to provide a simple and free PHP script for those who want to achieve the same result on server side.

Code: PHP [Select]
  1. <?php
  2. /*
  3.   Copyright © 2018 tux. <[email protected]>
  4.   This work is free. You can redistribute it and/or modify it under the
  5.   terms of the Do What The Fuck You Want To Public License, Version 2,
  6.   as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
  7.  
  8.   GDPR SHIELD [PHP draft v1]
  9.  
  10.   Prerequisites:
  11.   * PHP
  12.   * GeoIP as described here: http://php.net/manual/en/geoip.requirements.php
  13.  
  14.   Usage:
  15.   <?php require("gdprshield.php"); ?>
  16.   <!doctype html>
  17.   <html>
  18.     ...
  19.   </html>
  20. */
  21. $disallowed_countries = ["BE", "BG", "CZ", "DK", "DE", "EE", "IE", "EL", "ES", "FR", "HR", "IT", "CY", "LV", "LT", "LU", "HU", "MT", "NL", "AT", "PL", "PT", "RO", "SI", "SK", "FI", "SE", "UK"];
  22. $ip = $_SERVER["REMOTE_ADDR"];
  23. if (in_array(geoip_country_code_by_name($ip), $disallowed_countries)) {
  24.     die("Your country does not want you to be here.");
  25.  
  26.     /*
  27.       The above code displays a plain error text.
  28.       If you prefer to redirect to a full-featured HTML page,
  29.       you could delete it and use a Location header instead:
  30.     */
  31.     header("Location: GDPR_blocked.php", true, 451);
  32. }
  33. ?>

Enjoy. And feel free to extend/fix/implement it as you wish.

13
I was bored.

Screenshot.png

Official support thingy.
(Does this still count as a viable NANY item for 2019?  :-[)

14
When I was talking about an application which I prototyped as a web service, I was talking about this:
https://tuxproject.d...ects/decision-sieve/

From the FAQ:

Generally spoken, this is a web service that will help you filter your bucket list. If you have a limited budget or you need to limit your shopping to a certain number of things, the Decision Sieve can help you clean up your list to a reasonable amount. I actually wrote it to decide about which whisky to buy - and it helped me a lot.

Here's the ugly source code. I'll probably procrastinate doing it "right". Also, I suck at CSS.
Enjoy or something.

15
What would you rather use and why?

I prototyped a new project (basically, a decision helper) in Javascript and ugly CSS and I need an idea if it would be worth the additional effort to reimplement it as native applications. (Platform-independent, of course.)

16
General Software Discussion / WINFILE is back
« on: April 09, 2018, 01:22 PM »
Finally, Microsoft came to the conclusion that people could want a multi-window file manager on Windows 10. :)
https://github.com/microsoft/winfile

17
You know what sucks?
E-mail address standards suck.

"very.(),:;<>[]\".VERY.\"[email protected]\\ \"very\".unusual"@strange.example.com

Did you know that this is a valid e-mail address? Well, it is. Try to validate that!

Oh, wait, there is a solution for that: My very own e-mail validation library.
https://github.com/d...malwieder/libvldmail

Will move away from GitHub some day. For now, it's there. Enjoy.

18
Looks like BitsDuJour has three SUMo offers by now:

http://www.bitsdujou...in=todays-deals-home
- Discounts for a 1-Year License
- Discounts for a Lifetime License

https://chefkochblog...eaway-by-bitsdujour/
- Free License. (At least according to the user name.)

 :huh:

Enjoy, probably.

19
The fan of old-school tools strikes again.  8)
(NANY 2019, anyone?)

Do you know what's missing in both POSIX and Windows? Right: A sane way to rename files/directories with a regular expression.
The usual approach on POSIX systems is:

ls * | sed -E 's/(.*)text(.*)to(.*)remove(.*)/mv & "$1$2$3$4"/' | sh

That is horrendously ugly and does not port well to Windows. Here is my slightly less horrendously ugly attempt to fix that:
https://bitbucket.org/tux_/remv

Enjoy.

20
N.A.N.Y. 2018 / NANY 2018 Release: UnClouder for Firefox
« on: November 18, 2017, 04:34 PM »
NANY 2018 Entry Information

Application Name UnClouder
Version 0.2
Short Description Replaces "the Cloud" marketing speech on websites you visit to correctly describe potential security issues.
Web Page http://mozilla.tuxproject.de/unclouder
Download Link https://addons.mozil...fox/addon/unclouder/
System Requirements
  • Firefox 57 or higher
Version History
  • 0.1: Initial release
  • 0.2: Grammar fixes, (virtual) DOM fixes
Author mouser  :P (just in case anything breaks)

One more? Fuck yeah!

This little side-project of mine is my first approach at a content script (formerly known as "userscript") for Firefox's WebExtension thingy. It basically grew as a playfield while preparing ymarks development, I just had the time to finish it.

Features:

If you visit a German or English website talking about "the Cloud" bullshit, this extension will replace that bullshit by "other people's computers" so you can easily see why the bullshit is bullshit.

Portability issues:

  • I only added two languages for now. I am lazy.
  • The UnClouder uses Firefox's "CLD2" language detector. Addendum: Chrome et al. support that too, but the messaging infrastructure seems to work differently. If anyone of you needs a Chrome/Vivaldi/... version, let me know that it might be worth the effort.

Enjoy or whatever.

21
N.A.N.Y. 2018 / NANY 2018 Release: Gowser, a Gopher browser
« on: November 04, 2017, 04:57 PM »
NANY 2018 Entry Information

Application Name Gowser
Short Description A simple Gopher browser
Supported OSes Compiled for Windows, would probably compile on *ix though
Web Page https://bitbucket.org/tux_/gowser (currently, source only)
System Requirements
  • Binary: Windows.
  • Source: Probably, Linux/Unix with GTK+ and Windows.
Version History
  • 20171104: init. DC build, may or may not break.
Author

Description
'member Gopher? I 'member.
Why is Gopher Still Relevant?

Features
  • Gowser will browse Gopher.
  • Can make me procrastinate working on ymarks.

Planned Features
  • Support for image and sound files.
  • Support for Gopher's killer feature: searches.
  • Bookmarks.

Screenshots
TMAVeTk.png

Usage
Installation
Unrar. Open the .exe. Enjoy.

Using the Application
Enter a Gopher URL.

Uninstallation
Remove the extracted .exe file.

Known Issues
  • Most of plain Gopher works, media files (images and sound files) don't (yet). As they rarely occur, I decided to postpone their implementation.
  • The one big advantage of Gopher towards HTTP is that you can easily search it. Maybe some day Gowser will support that, but it currently does not.
  • This build creates a debug log. If you experience crashes, you can send it to me or something.
  • There are crashes. Sorry.

22
N.A.N.Y. 2018 / NANY 2018 Release (preliminary alpha-or-so): ymarks
« on: October 30, 2017, 09:15 AM »
k0j8yAyE.jpg ymarks :: self-hosted cross-browser bookmarks sync

You know Xmarks, the almost legendary bookmark sync service that has been allowing you to synchronize your bookmarks across multiple browsers since 2006? I have been working on a self-hosted open-source alternative for a couple of months (skipping a couple of weeks because this is far from being my only ongoing development project) and I'm confident to be able to release a first version just in time for NANY 2018.

I implement the client part as a WebExtension, it will probably work with Firefox, Chrome, Vivaldi, Opera, and Edge without any modifications when I'm done. I'll also try to provide an Android app because mobile browsers suck when it comes to extensibility, but that does not have a high priority as of now.


DONEs and TODOs:

Bookmarks server:


  • Compiles on Windows done
  • Compiles on *ix done
  • Can retrieve and store bookmarks done
  • Can backup bookmarks done
  • Can send bookmarks to the client done

Browser extension:

  • Can upload bookmarks done
  • Can download bookmarks done
  • Can download previous bookmarks done
  • Automated downloads and uploads on start/changes done
  • Ensure cross-browser compatibility Write separate extensions because Mozilla is a cunt done

Android app:

  • Settings (UI & storage TODO
  • Bookmarks list TODO
  • Add/Edit/Delete bookmarks TODO

Prepare.

23
N.A.N.Y. 2018 / NANY 2018 Release: twtxtc
« on: September 17, 2017, 11:09 AM »
Application Name twtxtc
Short Description A command line client for the twtxt micro-blogging network
Supported OSes
  • tested on FreeBSD and Windows 10
  • will probably work everywhere else as long as a decent C compiler and curl exist
LicensesMostly WTFPL, includes one MIT-licensed library
Web Page https://hub.darcs.ne...rtuxmalwieder/twtxtc
Download Link Check the attachment or compile your own version from the website
System Requirements
  • runtime: curl (executable) in your PATH
  • building: CMake and a C compiler
Author Take a guess!

A command-line client for the twtxt micro-blogging system, written in C.

README (excerpts pasted here for your convenience, please refer to the website for boring technical details and TODOs):

What is twtxt?

twtxt is a decentralised, minimalist approach to micro-blogging, similar to Twitter but with self-hosted plaintext files. See the original twtxt documentation for details. twtxtc is a twtxt client written in the C language.

Requirements

Build or download an appropriate curl binary for your system and place it into your $PATH or the twtxtc folder. If you don't, you won't be able to retrieve your timeline. Sorry.

Usage

./twtxtc [COMMAND]

Commands

tweet <text>            Adds <text> to your twtxt timeline.
timeline                Displays your twtxt timeline.
following               Gives you a list of all people you follow.
follow <user> <URL>     Adds the twtxt file from <URL> to your timeline.
                        <user> defines the user name to display.
unfollow <user>         Removes the user with the display name <user> from your timeline.
help                    Displays a help screen.

Configuration

If found, twtxtc will use the .twtxtconfig file inside your HOME directory. (See twtxtc help for information on where it should be found.) The .twtxtconfig file is meant to be a valid JSON file like this:

{
    "nickname": "tux0r",
    "twtxtfile": "twtxt.txt",
    "maxlog": 100,
    "spacing": "   ",
    "following": {
        "user_1": "https://example.com/twtxt.txt",
        "user_2": "https://elsewhere.com/tweets.txt"
    }
}

Possible entries are:

  • nickname: Your preferred nickname. Only used to filter mentions to other people.
  • twtxtfile: The location of your twtxt.txt file. Defaults to ./twtxt.txt.
  • maxlog: The maximum number of entries shown when you view your timeline. Defaults to 100.
  • spacing: A string value that contains the spacing between the user name and the text when viewing your timeline. Defaults to three spaces.
  • following: A list of users you follow. Can be managed with the follow and unfollow commands.
The current limit of the list of users you are following is at 4 KiB. You probably won't reach that limit any time soon.

A Windows binary is attached. Here is the source code for your pleasure:
https://hub.darcs.ne...rtuxmalwieder/twtxtc

Have fun etc. etc.

24
While reviewing small browsers, I came across NetSurf as well. NetSurf is a fast and bloat-free web browser which happens to have got JavaScript support in younger incarnations by adding the Duktape ECMAScript engine.

Duktape, written in C, is much smaller than V8 or similar JS engines, making it a good choice for embedded systems or things like adding a scripting functionality to existing software. No web browser involved! It supports ECMAScript 5.1 with some additions from newer revisions, including regular expressions and Unicode. For lazy people like me, there is a C++ wrapper named Dukglue (quack!) available which lacks (good) documentation but works like a charm. If you ever thought that your application could need a good scripting engine, Duktape seems to be a good choice. Your C/C++ code can access any script functions and your scripts can access exported C/C++ symbols which is easier than it sounds.

You want an example? You get an example!
Assume that you want to have a JavaScript plug-in which doubles any input value.

Code: Javascript [Select]
  1. var DemoScript = {};
  2. DemoScript.double = function(number) {
  3.     return number*2;
  4. }
  5. DemoScript;

Here's how Dukglue probably* handles it:

Code: C++ [Select]
  1. #include <string>
  2. #include <iostream>
  3. #include <fstream>
  4. #include <dukglue/dukglue.h> // <- this is important
  5.  
  6. // ... blah ...
  7.  
  8. void processScripts(scriptfile) {
  9.     duk_context* ctx = duk_create_heap_default();
  10.    
  11.     std::ifstream infile(scriptfile); // add the exists() check yourself pls.
  12.     std::string file_contents = [&infile] {
  13.         // Read the script file contents for processing.
  14.         std::ostringstream ss{};
  15.         ss << infile.rdbuf();
  16.         return ss.str();
  17.     }();
  18.  
  19.     try {
  20.         // Give me a local handle to the script:
  21.         DukValue script = dukglue_peval<DukValue>(ctx, file_contents.c_str());
  22.  
  23.         // Try to call double(2):
  24.         int value = dukglue_pcall_method<int>(ctx, script, "double", 2);
  25.         std::cout << "The double value of 2 is " << value << std::endl;
  26.     }
  27.     catch (DukException& e) {
  28.         // Damn.
  29.         std::cout << "Blimey! Something bad happened. " << e.what();
  30.     }
  31.    
  32.     duk_destroy_heap(ctx);
  33. }
  34.  
  35. // now call processScripts("double.js"); or whatever.

* I was lazy, I just assumed it would work like this and it probably does. A more complex and actually tested ;) example is part of my blog software (nudge, nudge).

According to mouser, this might be interesting for more people than just me. So here it is. :)

Pages: [1] 2 3next