Paul Sutton

Share

Use pastebin from command line

Use pastebin from command line

Quite often, when you have a problem where, in order to get help you need to paste the contents of a file,or command output so that it can be shared, for example on IRC (Chat) or a forum, this can be challenging to begin with.

As it is depreciated that you paste more than 2 lines in to IRC chat. The way round this is to use a service called pastebin. Debian [1] has it's own service for this [2]. There is a tool called pastebinit which is really helpful from the command line.

The first step is to switch to the root user. Sear for and install the package pastebinit as per below.

Search

root@Desktop:/home/user# apt search pastebinit
Sorting... Done
Full Text Search... Done
pastebinit/stable 1.5.1-1 all
  command-line pastebin client

Install

root@Desktop:/home/user# apt install pastebinit
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-image-5.10.0-7-amd64 linux-image-5.10.0-8-amd64
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  pastebinit
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 46.6 kB of archives.
After this operation, 342 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 pastebinit all 1.5.1-1 [46.6 kB]
Fetched 46.6 kB in 0s (342 kB/s)
Selecting previously unselected package pastebinit.
(Reading database ... 190310 files and directories currently installed.)
Preparing to unpack .../pastebinit_1.5.1-1_all.deb ...
Unpacking pastebinit (1.5.1-1) ...
Setting up pastebinit (1.5.1-1) ...
Processing triggers for man-db (2.9.4-2) ...
root@Desktop:/home/user# 

Once complete switch back to normal user (usually type exit)

user@Desktop:~$ cat /etc/apt/sources.list > pastebinit
user@Desktop:~$ cat /etc/apt/sources.list | pastebinit
https://paste.debian.net/1228146/

In this example I have used the cat command and piped the contents in to pastebinit, this has given me a url to paste in to chat, (or copy manually)

Open this in a browser and you and others can see the contents, and people can help you further.

paste bin it output

This is really useful too if you are stuck at the command prompt, without a graphical interface.

Links

1 Debian 2 pastebin – debian 3 Paignton Library STEM Group TAGS

#Debian,#GNULinux,#Paste,#Text,#Pastebin,#Share,#Troubleshooting


Donate using Liberapay

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License

Jit.si Meet

Did you know there is a #libre alternative to #zoom respects privacy, can be self hosted.

Have a look at

#jitsimeet,#FreeSoftware,#Use,#Study,#Modify,#Share,#Meeting, #Video,#Voice,#Chat

4 Freedoms

Share Graphics on Next Cloud

So Further to the video / post yesterday

In a similar way to how you can share a video on BBB you can share graphics in markdown, by doing something similar. This works on WriteAs / WriteFreely

I uploaded ILoveFS.png

So adding /download?.png to

https://nc.phillw.org/index.php/s/BsMHAQ8sKDKExfW

Embeds the graphics in the page.

I Love Free Software

REFERENCES

TAGS

#YearOfTheFediverse,#NextCloud,#Share,#Graphics, #ProblemSolving

Donate using Liberapay

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License

Adding CC Images To Photos

This is a re-post from December 2019

If you create lots of media such as photos or graphics. You may want to add information pertaining to the copyright (or ideally copyleft) of the image.

As I am interested in Creative Commons (CC) then it makes sense to be able to add one of the many creative commons license logos to an image.

I asked on Friendica about how to do this (having tried and failed before) and was provided with some help and a really useful shell script to automate the process.

Firstly we need an image to modify and a logo image to add to this:

cc-by logo

Example logo file to insert

cc-by logo

For the sake of this article, I am just using a random photo I took of Paignton Geopark. I have also reduced the image size to 640×480 to make it smaller for the website as per command below.

gm mogrify -resize 640×480 *.JPG

I also had to convert the jpg files to png files with the following

gm convert DSCF0182mod.jpg DSCF0182mod.png

So that this blog would display the images.

The next step is to create a folder structure to contain what we need to undertake the work.

What we need is a new folder

Inside this, we need another folder called out

mkdir out

we need some more files mostly the cc logos, these are available from a simple duckduckgo search.

Note if putting on a website or other media you need to properly include the creative commons license being used on here I have put

''' Licenced under Attribution 4.0 International (CC BY 4.0) '''

Which should then link to the human readable license terms you want to use.

So what we should have is

\insertcc-logo\insertcc.sh

\insertcc-logo\out

\insertcc-logo\out\88×31.png

\insertcc-logo\out\88×31-sa.png

\insertcc-logo\out\cc-zero.png

etc

Put the SOURCE FILE in \insertcc-logo

MODIFY AND RUN the script below

Our script looks like ( save this as insertcc.sh or what you want to call this )

for p in *.JPG; do convert “$p” ./out/88×31.png -gravity southeast -geometry +10+10 -composite “out/$p”; done

What the script does is take each file with the JPG extension (or other extension), add the required logo, and save the modified file in

\insertcc-logo\out

As per :

cc-by logo

You need to make sure that the script points to the correct source files.

You also need to point the script to the correct file you want to insert in to your source image.

for p in *.JPG;

To use a different logo change this section of the script

$p” ./out/88×31.png

This article originally appeared on http://www.zleap.net.

#photo,#embed,#add,#creativecommonslogo,#linux #graphicsmagick,#editing,#manipulation,#bash,#commands, #media,#copyleft,#attribute,#share,#alike,#sharealike, #commons,#freedom,

You can find me on Friendica at zleap@social.isurf.ca


cc-by logo

Licenced under Attribution 4.0 International (CC BY 4.0)

Scratch : Share projects

By default, Scratch projects are set to private. This means that only you can edit them. This feature helps to keep users safe. However the very nature of Scratch is collaborative and you are encouraged to share, but remember to be safe while you are sharing, Ask a grown up first.

To share your new project:

  1. Fill in the name box next to the orange share button.
  2. Click the orange share button.

share scratch projects

Don't worry if you forget to give your project a name, clicking on the share button brings up this screen.

share scratch projects

Adding to a studio

Method 1

From the above screen you will see there is an Add to studio button near the bottom right

Method 2

If you click on your name in the corner, click my stuff you are then taken to this screen, where you can share your project with a studio you are following.

share scratch projects

share scratch projects

You do this by clicking Add to and selecting the studio from the list.

#scratch, #share, #project, #howto

cc-by logo

Licenced under Attribution 4.0 International (CC BY 4.0)