Archive for the ‘Development’ Category
Posted by jpluimers on 2023/04/04
Earlier this week I got reminded of the “book” so many people seem to fall for via the Tweet by [Wayback/Archive] turbo (@turboCodr) / Twitter.
The image (and text) is in fact a parody both on ChatGPT and on the Stack Overflow meme it is based on (more on my opinion on both further below).
Back to the book title referred by [Wayback/Archive] turbo on Twitter: “Something something last tech book you’ll ever buy”.:
Deploying untested code at break-neck speeds
Essential
Copying and Pasting from ChatGPT
O’REILLY
The Practical Developer
Read the rest of this entry »
Posted in AI and ML; Artificial Intelligence & Machine Learning, Awareness, ChatGPT, Development, GPT-3, Software Development | Leave a Comment »
Posted by jpluimers on 2023/04/03
- [Archive] Alt Text Reader (@get_altText) / Twitter
I read alt texts from images for you – just mention me in the reply to an image! (alt texts are a cool & accessible way to describe images – see pinned tweet)
(If I’m broken, complain to @malfynnction)
- [Archive] captions_please (@captions_please) / Twitter
I’m a bot, just starting to beep boop. Tag me in a tweet (or a reply to a tweet) and I’ll do my best to describe the image. Try @captions_please help for more
The first is developed and maintained by [Archive] φnn (@malfynnction) / Twitter with source code at [Wayback/Archive] malfynnction/AltText-Tweeter.
The second is developed and maintained by [Archive] Anil (@TheOtherAnil) / Twitter, with source code at [Wayback/Archive] AnilRedshift/captions_please_go where I learned the bot actually understands more commands, even some German:
Look for these methods in the file [Wayback/Archive] captions_please_go/parse_command.go at main · AnilRedshift/captions_please_go:
parseCommand
parseGerman
parseEnglish
parseGermanRemoveModifiers (removes words und and das)
parseGermanDirectives (understands the words hilfe, alternativtext, scannen, beschreiben, text)
parseEnglish
parseEnglishRemoveModifiers (removes words and and the)
parseEnglishLang (conditionally removes words in and into)
parseEnglishDirectives (understands the phrases help, auto, text, ocr, describe, caption, alttext, alt_text, alt text, translate, get)
parseTag (gets the target IETF Language Tag – like du-nl for Dutch-Netherlands or de-de for German-Germany, and fr-be for French-Belgium)
| English / German |
Example |
Action |
(nothing, internally called auto) |
As in @captions_please |
Tweets best it can do:
alt text if there is an image with an alt attribute,
ocr if there is an image without an alt attribute,
describe when no alt text or ocr can be returned.
|
help / hilfe |
As in @captions_please help |
Tweets help text |
alt text, alttext, alt_text / alternativtext |
As in @captions_please alt text |
Tweets user-supplied alt text |
ocr, text, get text / scannen |
As in @captions_please ocr |
Scan the image for text, then tweets the result |
describe, caption / beschreiben |
As in @captions_please describe |
Tweets the AI generated description of the image |
translate |
As in @captions_please translate |
Tweets the translated text |
Also observe the commands set boolean flags in a structure, so it is possible to issue multiple commands at once (like @captions_please ocr translate fr-be)
The above Twitter accounts are complementing the below accounts/commands that I wrote about in One of the coolest Twitter bots commands: @AltTextCrew OCR please (and which both are being developed and maintained by [Archive] LGBTired 🏳️⚧️⚢ (@hbeckpdx) | Twitter):
–jeroen
Posted in About, accessibility (a11y), Awareness, Development, Inclusion / inclusive society, LifeHacker, Personal, Power User | Leave a Comment »
Posted by jpluimers on 2023/03/29
I’ve switched to either Markdown or reStructuredText for documentation purposes a while ago.
Often Twitter threads or Tweets are a useful addition to that, so it makes sense being able to convert them to a more portable format, especially since both Markdown and reStructuredText render well on GitHub (including Gists) and GitLab (including Snippets).
So here are some links that hopefully will get me going in the future:
–jeroen
Posted in Development, Lightweight markup language, MarkDown, reStructuredText, Software Development | 1 Comment »
Posted by jpluimers on 2023/03/28
Posted in *nix, *nix-tools, Communications Development, ConPTY, Console (command prompt window), Development, Internet protocol suite, OpenSSH, Power User, SSH, ssh/sshd, TCP, Windows, Windows 10, Windows 11 | Leave a Comment »
Posted by jpluimers on 2023/03/22
Kristian Kohntöpp publishes great DevOps related threads on Twitter. [Wayback/Archive] Thread by @isotopp “I am Kris, and I am 53 now. I learned programming on a Commodore 64 in 1983. My first real programming language (because C64 isn’t one) was 6502 assembler, forwards and backwards. “ is his response, about a year and a half ago, to a request by Julia Evans (@b0rk) that I also saved: [Wayback/Archive] Thread by @b0rk on Thread Reader App – Thread Reader App.
Her request: [Archive] 🔎Julia Evans🔍 on Twitter: “if you’ve been working in computing for > 15 years — are there fundamentals that you learned “on the job” 15 years ago that you think most people aren’t learning on the job today? (I’m thinking about how for example nobody has ever paid me to write C code)” / Twitter followed by [Archive] 🔎Julia Evans🔍 on Twitter: “I’m especially interested in topics that are still relevant today (like C programming) but are just harder to pick up at work now than they used to be” / Twitter.
The start of his thread is [Archive] Kris on Twitter: “@b0rk I am Kris, and I am 53 now. I learned programming on a Commodore 64 in 1983. My first real programming language (because C64 isn’t one) was 6502 assembler, forwards and backwards.” / Twitter.
Kristian’s story is very similar to mine, though I sooner stepped up the structured programming language ladder as at high school, I had access to an Apple //e with a Z80 card (yes, the SoftCard), so could run CP/M with Turbo Pascal 1.0 (later 2.0 and 3.0) which I partly described in The calculators that got me into programming (via: calculators : Algorithms for the masses – julian m bucknall), followed by early access at the close by university to PC’s running on 8086 and up. The computer science lab, now called Snellius, but back then known as CRI for Centraal RekenInstituut – is now had an educational deal with IBM, which means they switched from the PC/XT to the PC/AT with a 80286 processor as soon as the latter came out).
Read the rest of this entry »
Posted in 6502 Assembly, Assembly Language, Development, ESP32, ESP8266, Software Development, x86 | Leave a Comment »
Posted by jpluimers on 2023/03/16
PolyShell is a script that’s simultaneously valid in Bash, Windows Batch, and PowerShell (i.e. a polyglot).
[Wayback/Archive] llamasoft/polyshell: A Bash/Batch/PowerShell polyglot!
Need to check this out, as often I have scripts that have to go from one language to the other or vice versa.
Maybe it enables one language to bootstrap functionality in the other?
The quest
The above polyglot started with a quest to see if I can could include some PowerShell statements in a batch file with two goals:
- if the batch file started from the PowerShell command prompt, then execute the PowerShell code
- if the batch file started from the
cmd.exe command prompt, then have it start PowerShell with the same command-line arguments
The reasoning is simple:
- PowerShell scripts will start from the PATH only when PowerShell is already running
- Batch files start from the path when either
cmd.exe or PowerShell are running
Lots of users still live in the cmd.exe world, but PowerShell scripts are way more powerful, and since PowerShell is integrated in Windows since version 7, so having a batch file bootstrap PowerShell still makes sense.
Since my guess was about quoting parameters the right way, my initial search for the link below was [Wayback/Archive] powershell execute statement from batch file quoting – Google Search.
I have dug not yet into this, so there are still…
Many links to read
These should give me a good idea how to implement a polyglot batch file/PowerShell script.
–jeroen
Posted in *nix, *nix-tools, bash, bash, Batch-Files, Development, JavaScript/ECMAScript, Perl, Polyglot, Power User, PowerShell, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2023/03/15
Yup, web browser bookmarklets, though hardly published about any more, I still like them (and wrote about them before). With a little bit, usually unreadable, JavaScript, they can add magical functionality to your browser.
So here are some links on Twitter related bookmarklets:
- [Wayback/Archive] Send to Twitter Bookmarklet (uses document.title and URL as content) with this URI:
javascript:location.href='http://twitter.com/share?url='+encodeURIComponent(window.location.href)+'&text='+encodeURIComponent(document.title)
which I reworked into:
javascript:window.open('http://twitter.com/share?url='+encodeURIComponent(window.location.href)+'&text='+encodeURIComponent(document.title))
- These are all from the same author:
All code from the above links seemed to give corrupted tweets, which I thought was because of quote beautification, but was just me doing the whitespace removal wrong.
This is the right one:
javascript:(function(){n=getSelection().anchorNode;if(!n){t=document.title;}else{t=n.nodeType===3?n.data:n.innerText;}t='“'+t.trim()+'”\n\n';window.open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(t)}${document.location.href}`)})();
which I reworked using «» quotes into:
javascript:(function(){n=getSelection().anchorNode;if(!n){t=document.title;}else{t=n.nodeType===3?n.data:n.innerText;}t='«'+t.trim()+'»\n\n';window.open(`https://twitter.com/intent/tweet?url=${document.location.href}&text=${encodeURIComponent(t)}`)})();
All via [Wayback/Archive] twitter bookmarklet – Google Search.
–jeroen
Posted in Bookmarklet, Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »