Webwasp, to Humor
@Webwasp@mas.to avatar

Have a break, have a Kit Kat

documentcloud, to random

Got some audio you need transcribing? DocumentCloud now has built-in audio transcription tools, and now you can tweak the model to either improve accuracy or boost speed: https://www.documentcloud.org/app?q=#add-ons/MuckRock/documentcloud-whisper-addon

hypolite, to ADHD
10 Restlessness
20 Take on too many projects
30 Anxiety about amount of work
40 Painfully power through/Ditch projects
50 GOTO 10

And on and on...

MichaelTBacon, to Meditation
@MichaelTBacon@social.coop avatar

Wondering about the experiences with and for other folks with , particularly "inattentive type" (or what we used to just call ) and particularly if you experience hyperfocus.

I had a very adverse experience with a therapist obsessed with mindfulness apps who wouldn't listen or engage with my bad responses to them, and as I've tried to reconstitute my own practices, I'm wondering if hyperfocus tendencies alter what methods one should use. 🧵

Kalcifer, (edited ) to lemmy in Should Mastodon votes be federated into Lemmy?
@Kalcifer@sh.itjust.works avatar

They may want to like something, but not up vote it.

Isn’t that the point of the “Add activity” (Section 6.6 of the ActivityPub Documentation)? I think it is equivalent to a “Favorite” in Lemmy.

They may not even care about the voting system and not want to participate.

This point feels moot, to me.

Also on a technical level, it’d be messy to make the two compatible.

They already are compatible, though, aren’t they? That’s the whole point of the ActivityPub protocol. Mastodon, of course, won’t accept downvotes since, afaik, that is an extension made to the protocol by Lemmy, but likes/favorites/upvotes should federate normally.

jxself, to random
@jxself@mastodon.social avatar

What's the most important lesson you've learned this year? #YearInReview

jameshowell,
@jameshowell@emacs.ch avatar

Over the past ten years or so, I experienced a gradual shift from (a frustrated) "to get the most out of free software, I'm going to HAVE TO LEARN TO CODE!" to (a gratified) "the more I learn to code the more I get out of free software."

In short, it was the cumulative, very high-feedback, very low-barrier-to-entry list of idiosyncratic desires for tweaking my #Org mode workflows, then customizing my #mu4e workflows ... before I knew it I had written a couple of major and minor modes to mitigate my own #ADD.

Nothing impressive, but incalculably useful to me. A qualitative change in productivity. https://git.sr.ht/~jamesendreshowell/

#code #learntocode #FreeSoftware #Emacs #EmacsLisp
@dekkzz76 @jxself

hypolite, to ADHD

Here's a scene from the TV show Malcom in the Middle during which a character attempts to replace a lightbulb. It felt extremely relatable to both my partner and myself, at both ends of this not so rare situation.

Discovered via hachyderm.io/
Hal fixing a light bulb (from Malcolm in the Middle S03E06 - Health Scare)

alan, to ADHD

Earlier today I posed on keeping my ADD driven space more organized by trying to make a habit of putting projects away before they're finished, but I realized that was coupled to how I store projects, so I had to write two posts on my "everything else" blog to cover it all off. This one links to the next https://ambitonline.com/nextrelease/2023/12/add-and-the-art-of-putting-it-away-before-its-finished/

alan, to ADHD

The habit I am working on is to put a project away before it's done!

This is instead of leaving the project out "until I get back to it", which leads to an archaeological dig with the most recent project overflowing onto the previous project, which is overflowing onto the project before that, which... this results in a huge, oppressive, unmanageable, crushing mess.

The time/effort of putting it away and bringing it back out is far less than dealing with the mess.

jonhendry, to ADHD
@jonhendry@iosdev.space avatar

So people who take Jornay PM:

When do you take it? How long does it last for you?

chrisphin, to random
@chrisphin@mastodon.social avatar

Being a couple with undiagnosed issues is darkly hilarious because my wife texts as she’s leaving saying it’s bin day¹ and that if I could chuck some of the bin bags currently housed in our back porch² into the wheelie that would save me having to cycle them round to the dump today as I’d planned³, and I reply “Sure, if my brain lets me do that,” and she understands completely. Just a couple of fuckups tryna get through the day.

myiu, to ADHD

i kinda need a fidget toy. something to apply pressure to. any recommendations?

simon, to random
@simon@simonwillison.net avatar

I wrote up some very extensive notes on my exploration of the new GPTs feature of ChatGPT:

Exploring GPTs: ChatGPT in a trench coat?

https://simonwillison.net/2023/Nov/15/gpts/

simon,
@simon@simonwillison.net avatar

One more delightfully dumb GPT for you: Add a walrus. Which adds a walrus to any image you upload to it. https://simonwillison.net/2023/Nov/15/gpts/#add-a-walrus

simon,
@simon@simonwillison.net avatar

@jsled @runewake2 I updated the original blog post with some more notes on this: https://simonwillison.net/2023/Nov/15/gpts/#add-a-walrus

simon,
@simon@simonwillison.net avatar

@j2bryson I added some notes about that here: evidently GPT-Vision deliberately can't see skin color https://simonwillison.net/2023/Nov/15/gpts/#add-a-walrus

Richard_Littler, to ADHD
@Richard_Littler@mastodon.social avatar

My pharmacy is having problems acquiring Dexamphetamine and are offering me (the more expensive) Attentin instead.
Anyone had experience with the latter?

@actuallyadhd

pixiecata, to animals
@pixiecata@apobangpo.space avatar

I miss Biko. She now lives with my niece in a different city. For a long while she was our only dog, until Pixie came along. Biko has the softest fur, super great to hug.

tsmyther,
@tsmyther@triangletoot.party avatar

@pixiecata I had a therapist suggest I may have to re-home my dog. I think I’d rather be an emotional mess and let my ruin my life than get rid of Jack. Hope you’re coping better than I would!

blog, to HowTo
@blog@shkspr.mobi avatar

Rewriting WordPress's JetPack Related Posts Shortcode
https://shkspr.mobi/blog/2023/10/rewriting-wordpresss-jetpack-related-posts-shortcode/

I like the JetPack related post functionality. But I wanted to customise it far beyond what the default code allows for.

So here's how I went from this:

The old layout has three items, with small images and indistinct text.

To this:

The new layout has 4 items, each boxed off, with a larger image and more distinct text.

Documentation

The complete documentation for related posts is pretty easy to follow.

This is an adaptation of "Use ".

Remove the automatic placement

You can turn off the original "related posts" by adding this to your theme's functions.php:

function jetpackme_remove_rp() {    if ( class_exists( 'Jetpack_RelatedPosts' ) ) {        $jprp = Jetpack_RelatedPosts::init();        $callback = array( $jprp, 'filter_add_target_to_dom' );        remove_filter( 'the_content', $callback, 40 );    }}add_filter( 'wp', 'jetpackme_remove_rp', 20 );

Add the new Related Posts

In your theme's index.php (or wherever else you like) you can add this code to insert the new related posts functionality:

if ( is_single() ) {    echo "<section>";        echo do_shortcode( '[jprelp]' );    echo "</section>";}

Create the new functionality

And this goes in your theme's functions.php file. I've commented it as best I can. Let me know if you need more info.

function jetpackme_custom_related() {    //  Check that JetPack Related Posts exists    if (            class_exists( 'Jetpack_RelatedPosts' )            && method_exists( 'Jetpack_RelatedPosts', 'init_raw' )    ) {            //  Get the related posts            $related = Jetpack_RelatedPosts::init_raw()                ->set_query_name( 'edent-related-shortcode' )                 ->get_for_post_id(                    get_the_ID(),   //  ID of the post                    array( 'size' => 4 )//  How many related items to fetch                );            if ( $related ) {                //  Set the container for the related posts                $output = "<h2 id='related-posts'>The Algorithm™ suggests:</h2>";                $output .=   "<ul class='related-posts'>";                foreach ( $related as $result ) {                    $related_post_id = $result['id'];                    // Get the related post                    $related_post = get_post( $related_post_id );                    //  Get the attributes                    $related_post_title = $related_post->post_title;                    $related_post_date  = substr( $related_post->post_date, 0, 4 ); // YYYY-MM-DD                    $related_post_link  = get_permalink( $related_post_id );                    //  Get the thumbnail                    if ( has_post_thumbnail( $related_post_id) ) {                        $related_post_thumb = get_the_post_thumbnail( $related_post_id, 'full',                             array( "class"   => "related-post-img",                                   "loading" => "lazy" //   Lazy loading and other attributes                            )                         );                    } else {                        $related_post_thumb = null;                    }                    //  Create the HTML for the related post                    $output .= '<li class="related-post">';                    $output .=    "<a href='{$related_post_link}'>";                    $output .=       "{$related_post_thumb}<p>{$related_post_title}</p></a>";                    $output .=    "<time>{$related_post_date}</time>";                    $output .= "</li>";                }                //  Finish the related posts container                $output .="</ul>";            }        //  Display the related posts        echo $output;    }}add_shortcode( 'jprel', 'jetpackme_custom_related' );   //  Shortcode name can be whatever you want

Bit of CSS to zhuzh it up

Feel free to add your own styles. This is what works for me.

.related-posts  {    list-style: none;    padding: 0;    display: inline-flex;    width: 100%;    flex-wrap: wrap;    justify-content: center;}.related-posts > * {    /* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flexible_box_layout/Controlling_ratios_of_flex_items_along_the_main_axis#combining_flex-grow_and_flex-basis */    flex: 1 1 0;}    .related-post {        min-width: 10em;        max-width: 20em;        text-align: center;        margin: .25em;        border: .1em var(--color-text);        border-style: solid;        border-radius: var(--border-radius);        position: relative;        display: flex;        flex-direction: column;        min-height: 100%;        overflow: clip;    }        .related-post h3 {            font-size: 1em;            padding-top: .5em;        }        .related-post img {            object-fit: cover;            height: 9em;            width: 100%;            border-radius: 0 1em 0 0;            background: var(--color-text);            display: inline-block;        }        .related-post p {            margin: 0 .25em;        }        .related-post time {            font-size: .75em;            display: block;        }

ToDo

  • Use transients to store the data to prevent repeated slow API calls?
  • Perhaps some teaser text?
  • Adjust the layout so the date always floats to the bottom?

https://shkspr.mobi/blog/2023/10/rewriting-wordpresss-jetpack-related-posts-shortcode/

aeveltstra, to actuallyautistic
@aeveltstra@mastodon.social avatar

@actuallyautistic So forgetful you lose your keys all the time? Put down your phone and don't remember where? You, like me, may suffer . A condition common to people, for some reason.

Tether your keys to your pants or bag. Have a designated spot for your phone. Always lock your door with your key. I've got 50 years worth of experience and tips. AMA.

stavvers, to random
@stavvers@masto.ai avatar

Does anyone have any resources for managing neurodiverse people at work? I have an autistic+ADHD pal who needs support and adjustments made in how they work (e.g. better ways of tracking hours, trouble with being interrupted during a task, looming existential dread at unplanned meetings and most of all difficulty articulating needs) and it would be great to send them something they can show their manager.

Jorsh,
@Jorsh@beige.party avatar

@stavvers

I hate being interrupted during a task. I'll invariably forget where the fuck I was.

devinprater, to random

If I used alarms to their fullest:

Buzz: Hey, you need to be doing this thing right now.

(a minute later) Buzz: Hey, remember that thing you're supposed to be doing right now?

(a few minutes later) buzz: Hey, just making sure you're doing the thing.

(a few minutes later) Buzz: Okay, you're probably losing focus, so do this other thing for a few minutes.

Until finally my phone buzzes so much it just shatters.

nekusoul, to technology in Philips Hue will force users to upload their data to Hue cloud
@nekusoul@lemmy.nekusoul.de avatar

To start off, you’ll want to have Home Assistant running on a local server or Raspberry Pi and a Zigbee USB dongle, like the Conbee II or SkyConnect. If you’ve never worked with Home Assistant, their Getting Started guide is pretty comprehensive.

To migrate the apps off the Hue gateway, there’s a section describing various methods to do so in the Home Assistant Zigbee guide.

I’ll mention that there’s also a whole bunch of other Zigbee gateways out there that work similar to the Hue Bridge, but these could all eventually share the same fate as Hue, if they aren’t already forced to be online.

craigevil, to linux in SHARE WITH THE CLASS: What aliases are you using?
@craigevil@lemmy.ml avatar

A bit long, but here goes:

Start gomuks Matrix Client

alias gomuks=/home/craig/.local/bin/gomuks-linux-arm64

walk: Terminal File Manager

github.com/antonmedv/walk

alias walk=“walk --icons"

Weather:github.com/chubin/wttr.in

alias weather=”/home/craig/.local/bin/weather.sh"

Onelinershell github.com/Onelinerhub/shellhub

alias oh="/home/craig/.local/bin/oh.sh"

Show open ports

alias ports='sudo netstat -tulanp’

Refresh .bashrc

alias bashrc="source ~/.bashrc"

become root

alias root=‘sudo -i’ alias su='sudo su’

Fix which

alias which='command -v’

APT User Commands

alias search=‘apt search’ alias file=‘apt-file search’ alias policy=‘apt policy’ alias show="nala show"

if user is not root, pass all commands via sudo

if [ $UID -ne 0 ]; then alias update=‘sudo apt update’ alias ainstall=‘sudo apt install’ alias apurge=‘sudo apt purge -y --autoremove’ alias upgrade=‘sudo nala upgrade’ alias aremove=‘sudo apt autoremove -y’ alias clean=‘sudo nala clean’ alias reboot=‘sudo reboot’ alias shutdown=“sudo shutdown -P now” fi

Handy-dandy aliases for journalctl and systemctl

alias jc=‘sudo journalctl -b’ alias jca=‘sudo journalctl’ alias jcf=‘sudo journalctl -f’ alias jcr=‘sudo journalctl --list-boots’ alias sc='sudo systemctl’

Making files immortal & executable

alias im+=“sudo chattr +i” alias im-=“sudo chattr -i” alias exe=“sudo chmod +x”

safety nets

do not delete / or prompt if deleting more than 3 files at a time

alias rm='rm -I --preserve-root’

confirmation

alias mv=‘mv -i’ alias cp=‘cp -i’ alias ln='ln -i’

Parenting changing perms on /

alias chown=‘chown --preserve-root’ alias chmod=‘chmod --preserve-root’ alias chgrp='chgrp --preserve-root’

copy the current working directory to the clipboard

alias cpwd='pwd | xclip -selection clipboard’

Clipboard

alias cpy="xclip -selection clipboard"

quick directory movement

alias …=‘cd …’ alias …=‘cd …/…’ alias …='cd …/…/…'

go to the last directory you were in

alias back='cd $OLDPWD’

quickly find files and directory

alias ff=‘find . -type f -name’ alias fd='find . -type d -name’

Create Python virtual environment

alias ve=‘python3 -m venv ./venv’ alias va='source ./venv/bin/activate’

Ping Commands

Stop after sending count ECHO_REQUEST packets

alias ping=‘ping -c 5’ alias pg="ping google.com -c 5"

alias shortcuts

alias rpi=“sudo rpi-update” alias rpi-next=“sudo BRANCH=next rpi-update” alias raspi=“sudo raspi-config” alias clr=“clear” alias clrh=“history -c -w ~/.bash_history” alias df=‘df -H’ alias du=‘du -ch’ alias mk=“mkdir -p” alias loading="sudo dmesg > ~/dmesg.txt"

ls Commands

Colorize the ls output and human readable sizes

alias ls='ls --color=auto --human-readable -al’

Use a long listing format

alias ll='ls -la’

Show hidden files

alias l.='ls -d .* --color=auto’

Listing files in folder

alias listkb=“ls -l --block-size=K” alias listmb="ls -l --block-size=M"

Colorize the grep command output for ease of use (good for log files)##

alias grep=‘grep --color=auto’ alias egrep=‘egrep --color=auto’ alias fgrep='fgrep --color=auto’

Colorize diff output

alias diff='colordiff’

Start calculator with math support

alias bc="bc -l"

Resume wget by default

alias wget="wget -c"

ps Commands

alias ps="ps auxf"

Get top process eating cpu

alias pscpu=“ps auxf | sort -nr -k 3” alias pscpu10="ps auxf | sort -nr -k 3 | head -10"

Get top process eating memory

alias psmem=‘ps auxf | sort -nr -k 4’ alias psmem10='ps auxf | sort -nr -k 4 | head -10’

Free and Used Ram

alias meminfo=‘free -l’ alias free='free -mt’

Run top in alternate screen

alias top=‘tput smcup; top; tput rmcup’

cobalt, to ADHD
@cobalt@awscommunity.social avatar

3 or things today:

  1. Finding my lost $60 when I took clothes out of the dryer.

  2. My son pointedly asked about turning off the hose watering one bush only. For 3 hours.

  3. Finding my opened can of beer finally. After an hour or 2. The beer was now 116°.

dejo, (edited ) to science Serbian

Hi, I'm not quite sure if this vhdl code and testbench is correct for the given task. Can you take a look?

Design a one-hour kitchen timer. The device should have buttons/switches to start and stop the timer, as well as to set the desired time interval for the alarm. Realize the task using the software package Quartus or in GHDL, confirm the correctness of the project task by simulation.

This is VHDL code:

use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity Kitchen_Timer is
  port (
    clk   : in std_logic;    -- Clock input
    reset : in std_logic;    -- Reset input
    start : in std_logic;    -- Start button input
    stop  : in std_logic;    -- Stop button input
    alarm : out std_logic    -- Alarm output
  );
end entity Kitchen_Timer;

-- Declare the architecture for the kitchen timer
architecture Behavioral of Kitchen_Timer is
  signal count     : integer range 0 to 3600 := 0;   -- Counter for timer
  signal alarming  : std_logic := '0';               -- Signal to indicate alarming interval
  signal alarm_en  : std_logic := '0';               -- Signal to enable alarming interval
  signal alarm_cnt : integer range 0 to 600 := 0;    -- Counter for alarming interval
begin
  -- Process to control the kitchen timer and alarming interval
  process (clk, reset)
  begin
    if (reset = '1') then
      count     <= 0;
      alarming  <= '0';
      alarm_en  <= '0';
      alarm_cnt <= 0;
    elsif (rising_edge(clk)) then
      if (stop = '1') then
        count     <= 0;
        alarming  <= '0';
        alarm_en  <= '0';
        alarm_cnt <= 0;
      elsif (start = '1' and count < 3600) then
        count <= count + 1;
        if (count = 3600) then
          count     <= 0;
          alarming  <= '0';
          alarm_en  <= '0';
          alarm_cnt <= 0;
        elsif (count > 0) then
          alarm_en <= '1';
        end if;
      end if;

      if (alarm_en = '1') then
        if (alarm_cnt < 600) then
          alarm_cnt <= alarm_cnt + 1;
        else
          alarm_cnt <= 0;
          alarming  <= '1';
        end if;
      end if;
    end if;
  end process;

  -- Assign the alarm output
  alarm <= alarming;
end architecture Behavioral; ```


This is Testbench:

```library ieee;
use ieee.std_logic_1164.all;

entity tb_Kitchen_Timer is
end tb_Kitchen_Timer;

architecture tb of tb_Kitchen_Timer is

    component Kitchen_Timer
        port (clk   : in std_logic;
              reset : in std_logic;
              start : in std_logic;
              stop  : in std_logic;
              alarm : out std_logic);
    end component;

    signal clk   : std_logic;
    signal reset : std_logic;
    signal start : std_logic;
    signal stop  : std_logic;
    signal alarm : std_logic;

    constant TbPeriod : time := 1000 ns; -- EDIT Put right period here
    signal TbClock : std_logic := '0';
    signal TbSimEnded : std_logic := '0';

begin

    dut : Kitchen_Timer
    port map (clk   => clk,
              reset => reset,
              start => start,
              stop  => stop,
              alarm => alarm);

    -- Clock generation
    TbClock <= not TbClock after TbPeriod/2 when TbSimEnded /= '1' else '0';

    -- EDIT: Check that clk is really your main clock signal
    clk <= TbClock;

    stimuli : process
    begin
        -- EDIT Adapt initialization as needed
        start <= '0';
        stop <= '0';

        -- Reset generation
        -- EDIT: Check that reset is really your reset signal
        reset <= '1';
        wait for 100 ns;
        reset <= '0';
        wait for 100 ns;

        -- EDIT Add stimuli here
        wait for 100 * TbPeriod;

        -- Stop the clock and hence terminate the simulation
        TbSimEnded <= '1';
        wait;
    end process;

end tb;

-- Configuration block below is required by some simulators. Usually no need to edit.

configuration cfg_tb_Kitchen_Timer of tb_Kitchen_Timer is
    for tb
    end for;
end cfg_tb_Kitchen_Timer;```
T4V0,
T4V0 avatar

@dejo Whoops, I made a mistake, you don't need to include the entity when simulating. This line bellow should be the correct one:

add wave -label "count" -radix unsigned /dut/count

This is my .do file (when using Modelsim or Questa, change to the directory with all the .vhd files and the .do file and execute the command do tb.do):

tb.do

#Creates project's library
vlib work

#Compiles project with VHDL93 standard: all files used in the testbench. They should be compiled in order of dependency.
vcom -93 Kitchen_Timer.vhd testbench.vhd

#Simulates (work is the directory, tb_Kitchen_Timer is the entity's name).
#The argument -voptargs="+acc" is necessary to disable signal optimization in Questa.
vsim -voptargs="+acc" -t ns work.tb_Kitchen_Timer

#Show waveforms.
view wave

#Add specific signals.
# -radix: binary, hex, dec, unsigned.
# -label: wave's name.
add wave -label "clk" -radix binary /clk
add wave -label "reset" -radix binary /reset
add wave -label "start" -radix binary /start
add wave -label "stop" -radix binary /stop
add wave -label "adjust_interval_up" -radix binary /adjust_interval_up
add wave -label "adjust_interval_down" -radix binary /adjust_interval_down
add wave -label "alarm" -radix binary /alarm
add wave -label "count" -radix unsigned /dut/count
add wave -label "TbClock" -radix binary /TbClock
add wave -label "TbSimEnded" -radix binary /TbSimEnded

#Simulate for 1500 ns.
run 1500ns

# Zoom to fit entire window.
wave zoomfull
write wave wave.ps

I've also included the simulation result.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • modclub
  • DreamBathrooms
  • mdbf
  • khanakhh
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • InstantRegret
  • Youngstown
  • slotface
  • everett
  • kavyap
  • cisconetworking
  • JUstTest
  • ethstaker
  • tacticalgear
  • GTA5RPClips
  • osvaldo12
  • Durango
  • rosin
  • Leos
  • normalnudes
  • anitta
  • cubers
  • tester
  • provamag3
  • lostlight
  • All magazines