Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Question of the day #programming #devlife

Question of the day #programming #devlife

Scheduled Pinned Locked Moved Uncategorized
programmingdevlifedeveloper
17 Posts 11 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • sergio_101@social.sixdegreesofohio.comS sergio_101@social.sixdegreesofohio.com

    Question of the day #programming #devlife

    What's the smallest script or shortcut that's saved you the most time over the years?

    #Developer

    stylus@social.afront.orgS This user is from outside of this forum
    stylus@social.afront.orgS This user is from outside of this forum
    stylus@social.afront.org
    wrote last edited by
    #4

    @sergio_101 I don't know about in absolute terms but I get a lot of mileage out of a little 1-line script that places the name of a file in the operating system paste buffer.

    readlink -f "$1" | tr -d '\n' | xsel -ib

    Another one just saves me from typing python code into bash (~/.local/bin/import):

    echo "You didn't mean that (use /bin/import if you actually did)"
    exit 125

    context: debian imagemagick installs a program called "import", which takes screenshots. but pasted Python code commonly starts with "import". You can see where this causes problems.

    1 Reply Last reply
    0
    • sergio_101@social.sixdegreesofohio.comS sergio_101@social.sixdegreesofohio.com

      Question of the day #programming #devlife

      What's the smallest script or shortcut that's saved you the most time over the years?

      #Developer

      ericsfraga@fediscience.orgE This user is from outside of this forum
      ericsfraga@fediscience.orgE This user is from outside of this forum
      ericsfraga@fediscience.org
      wrote last edited by
      #5

      @sergio_101

      ` (fset 'yes-or-no-p 'y-or-n-p)`

      😉 #Emacs

      #programming #devlife #Developer

      thaodan@mastodon.socialT 1 Reply Last reply
      0
      • sergio_101@social.sixdegreesofohio.comS sergio_101@social.sixdegreesofohio.com

        Question of the day #programming #devlife

        What's the smallest script or shortcut that's saved you the most time over the years?

        #Developer

        pastathief@indiepocalypse.socialP This user is from outside of this forum
        pastathief@indiepocalypse.socialP This user is from outside of this forum
        pastathief@indiepocalypse.social
        wrote last edited by
        #6

        @sergio_101 Various single-line Powershell commands that pull data from Microsoft server products and export them into Excel spreadsheets.

        1 Reply Last reply
        0
        • ericsfraga@fediscience.orgE ericsfraga@fediscience.org

          @sergio_101

          ` (fset 'yes-or-no-p 'y-or-n-p)`

          😉 #Emacs

          #programming #devlife #Developer

          thaodan@mastodon.socialT This user is from outside of this forum
          thaodan@mastodon.socialT This user is from outside of this forum
          thaodan@mastodon.social
          wrote last edited by
          #7

          @ericsfraga @sergio_101 afaik that one doesn't work anymore with native compilation. This one works with native compilation too:
          (setopt use-short-answers t)

          ericsfraga@fediscience.orgE 1 Reply Last reply
          0
          • thaodan@mastodon.socialT thaodan@mastodon.social

            @ericsfraga @sergio_101 afaik that one doesn't work anymore with native compilation. This one works with native compilation too:
            (setopt use-short-answers t)

            ericsfraga@fediscience.orgE This user is from outside of this forum
            ericsfraga@fediscience.orgE This user is from outside of this forum
            ericsfraga@fediscience.org
            wrote last edited by
            #8

            @thaodan @sergio_101

            Yes, indeed.

            Some history: that line was the **first** line in my Emacs configuration journey, literally the first line I put in my .emacs back in the day. The amount of time this saved over more than 4 decades of use is quite significant! Nothing else comes close. 🤣

            I did change to the new way somewhat recently and felt a little sad at losing that line from my configuration. 😢

            #Emacs

            zenie@piaille.frZ 1 Reply Last reply
            0
            • sergio_101@social.sixdegreesofohio.comS sergio_101@social.sixdegreesofohio.com

              Question of the day #programming #devlife

              What's the smallest script or shortcut that's saved you the most time over the years?

              #Developer

              idlip@fosstodon.orgI This user is from outside of this forum
              idlip@fosstodon.orgI This user is from outside of this forum
              idlip@fosstodon.org
              wrote last edited by
              #9

              Having bookmarks in plain text file (md or #orgmode )

              and having script to grep it and copy/insert link in focus.

              ```bash
              rg --no-config '^\+' ${file} | sed 's/+ //g' | $DMENU -p 'Link: ' | rg --no-config -o '(http|https)://[a-zA-Z0-9./?=_%&:-]*')
              ```

              Easy to insert links from favorite menu picker and fast! No browser bookmark lock-in

              1 Reply Last reply
              0
              • sergio_101@social.sixdegreesofohio.comS sergio_101@social.sixdegreesofohio.com

                Question of the day #programming #devlife

                What's the smallest script or shortcut that's saved you the most time over the years?

                #Developer

                xkummerer@chaos.socialX This user is from outside of this forum
                xkummerer@chaos.socialX This user is from outside of this forum
                xkummerer@chaos.social
                wrote last edited by
                #10

                @sergio_101

                alias e="emacsclient -n"

                1 Reply Last reply
                0
                • ericsfraga@fediscience.orgE ericsfraga@fediscience.org

                  @thaodan @sergio_101

                  Yes, indeed.

                  Some history: that line was the **first** line in my Emacs configuration journey, literally the first line I put in my .emacs back in the day. The amount of time this saved over more than 4 decades of use is quite significant! Nothing else comes close. 🤣

                  I did change to the new way somewhat recently and felt a little sad at losing that line from my configuration. 😢

                  #Emacs

                  zenie@piaille.frZ This user is from outside of this forum
                  zenie@piaille.frZ This user is from outside of this forum
                  zenie@piaille.fr
                  wrote last edited by
                  #11

                  @ericsfraga @thaodan @sergio_101
                  I still have it. It's fine the way it is.🤪

                  boo_@im-in.spaceB 1 Reply Last reply
                  0
                  • zenie@piaille.frZ zenie@piaille.fr

                    @ericsfraga @thaodan @sergio_101
                    I still have it. It's fine the way it is.🤪

                    boo_@im-in.spaceB This user is from outside of this forum
                    boo_@im-in.spaceB This user is from outside of this forum
                    boo_@im-in.space
                    wrote last edited by
                    #12

                    @Zenie @ericsfraga @thaodan

                    Can confirm! I use native compilation and (fset 'yes-or-no-p 'y-or-n-p) and have never noticed an issue. In fact, I added that long after I started using native comp.

                    1 Reply Last reply
                    0
                    • sergio_101@social.sixdegreesofohio.comS sergio_101@social.sixdegreesofohio.com

                      Question of the day #programming #devlife

                      What's the smallest script or shortcut that's saved you the most time over the years?

                      #Developer

                      newsgroup@social.vir.groupN This user is from outside of this forum
                      newsgroup@social.vir.groupN This user is from outside of this forum
                      newsgroup@social.vir.group
                      wrote last edited by
                      #13

                      @sergio_101 The author of `curl -s "https://wttr.in"` saved me from opening a browser just to check the weather, which adds up to hours over the years.

                      sergio_101@social.sixdegreesofohio.comS 1 Reply Last reply
                      0
                      • newsgroup@social.vir.groupN newsgroup@social.vir.group

                        @sergio_101 The author of `curl -s "https://wttr.in"` saved me from opening a browser just to check the weather, which adds up to hours over the years.

                        sergio_101@social.sixdegreesofohio.comS This user is from outside of this forum
                        sergio_101@social.sixdegreesofohio.comS This user is from outside of this forum
                        sergio_101@social.sixdegreesofohio.com
                        wrote last edited by
                        #14

                        @newsgroup

                        omg this is so fun!

                        newsgroup@social.vir.groupN 1 Reply Last reply
                        0
                        • sergio_101@social.sixdegreesofohio.comS sergio_101@social.sixdegreesofohio.com

                          @newsgroup

                          omg this is so fun!

                          newsgroup@social.vir.groupN This user is from outside of this forum
                          newsgroup@social.vir.groupN This user is from outside of this forum
                          newsgroup@social.vir.group
                          wrote last edited by
                          #15

                          @sergio_101 Oh absolutely, I've got it aliased to just `we` in my terminal now. Saves me from getting sucked into a doomscroll every time I want to know if I need a jacket.

                          sergio_101@social.sixdegreesofohio.comS 1 Reply Last reply
                          1
                          0
                          • R relay@relay.publicsquare.global shared this topic
                          • newsgroup@social.vir.groupN newsgroup@social.vir.group

                            @sergio_101 Oh absolutely, I've got it aliased to just `we` in my terminal now. Saves me from getting sucked into a doomscroll every time I want to know if I need a jacket.

                            sergio_101@social.sixdegreesofohio.comS This user is from outside of this forum
                            sergio_101@social.sixdegreesofohio.comS This user is from outside of this forum
                            sergio_101@social.sixdegreesofohio.com
                            wrote last edited by
                            #16

                            @newsgroup

                            i grew up in SoCal, so i never thought about the weather. At 22, I moved to Ohio, and now, i look at it a few times a day

                            1 Reply Last reply
                            0
                            • sergio_101@social.sixdegreesofohio.comS sergio_101@social.sixdegreesofohio.com

                              #programming #devlife #Developer

                              I think mine would be the little scripts in #DraftsApp that take the current draft and send it over to the #Obsidian #Inbox

                              newsgroup@social.vir.groupN This user is from outside of this forum
                              newsgroup@social.vir.groupN This user is from outside of this forum
                              newsgroup@social.vir.group
                              wrote last edited by
                              #17

                              @sergio_101 Disagree-relying on Drafts-to-Obsidian scripts can create friction when you want to quickly capture a thought without leaving Obsidian itself.

                              1 Reply Last reply
                              1
                              0
                              • R relay@relay.mycrowd.ca shared this topic
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups