recentpopularlog in
« earlier  
RSSPreview – Get this Extension for 🦊 Firefox (en-US)
This is the good one; it has a preview of the feed that doesn't require clicking on anything.
firefox  addon  extension  webextension  quantum  rss  feedreader 
github - How can I determine the URL that a local Git repository was originally cloned from? - Stack Overflow |
Newer gits also have 'git remote get-url'.
If you want only the remote URL, or if your are not connected to a network that can reach the remote repo:
<code class="language-bash">
git config --get remote.origin.url
If you require full output and you are on a network that can reach the remote repo where the origin resides :
<code class="language-bash">
git remote show origin
git  remote  git-remote  url  shellscripting  scripting  solution 
#927669 - nvpy: could not connect to simplenote server - Debian Bug report logs |
This is the standard 'nvpy' package in Ubuntu 18.04. The reason is because 1.0.0 uses the retired Simplenote API. RIP.

Solution is to install it with pip3.
nvpy  debian  ubuntu  simplenote  bug  workaround 
How do I retrieve the terminal width in Perl? - Stack Overflow
<code class="language-perl">use Term::ReadKey;
($wchar, $hchar, $wpixels, $hpixels) = Term::ReadKey::GetTerminalSize();</code>

<code class="language-perl">my $width = `tput cols`;</code>
perl  terminal  tui  shellscripting  solution 
2 days ago
Going mad(1) - TJ Holowaychuk
mad(1) is a tiny tool that allows you to view markdown manual pages. I’m a huge fan of man in general, but the format is pretty annoying and often converted from markdown, textile etc anyway. The output man produces is also pretty bad in my opinion, mainly whitespace issues.
bash  shell  markdown  quickreference  viewer  alternativeto  mdless  mdv  nd 
3 days ago
tj/mad: mad(1) is a markdown manual page viewer
Probably want to apply right away, and 'cp *.md' from to ~/.local/share/mad.

This is also a really good template for new Bash utility scripts (good options parsing, local config, a 'share' directory, Makefile, self-update feature).
markdown  cli  commandline  viewer  bash  alternativeto  mdless  mdv  nd  quickreference  inspiration 
3 days ago
power management - How do I disable my system from going to sleep? - Ask Ubuntu |
Why the fuck doesn't the System Settings "Sleep after inactive for" setting do this this?
On Ubuntu 16.04 LTS, I successfully used the following to disable suspend:
<code class="language-bash">
sudo systemctl mask
And this to re-enable it:
<code class="language-bash">
sudo systemctl unmask
ubuntu  elementaryos  annoyance  sleep  suspend  powersave  powermanagement  systemd  maybesolution 
8 days ago
grub2 - How to get to the GRUB menu at boot-time? - Ask Ubuntu |
Menu will appear if you press and hold Shift during loading Grub, if you boot using BIOS. When your system boots using UEFI, press Esc.

For permanent change you'll need to edit your /etc/default/grub file -- place a "#" symbol at the start of line GRUB_HIDDEN_TIMEOUT=0.

Save changes and run sudo update-grub to apply changes.

grub  bootmanager  dammitbrain  solution 
8 days ago
HTTP range requests - HTTP | MDN |
If the Accept-Ranges is present in HTTP responses (and its value isn't "none"), the server supports range requests. You can check this by issuing a HEAD request with cURL, for example.
<code class="language-bash">
curl -I

# result:
# HTTP/1.1 200 OK
# ...
# Accept-Ranges: bytes
# Content-Length: 146515
curl  http  rangerequest  partialdownloads  resume  webdevel  solution  reference 
9 days ago
Troubleshooting the Windows Subsystem for Linux | Microsoft Docs |
Do this is an admin PowerShell
<code class="language-powershell">
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
windows  wsl  linux  virtualization  troubleshooting 
9 days ago
cmd - openssl hangs and does not exit - Stack Overflow |
<code class="language-bash">echo | openssl s_client -showcerts -connect > cert.txt</code> or <code class="language-bash">openssl s_client -showcerts -connect </dev/null >cert.txt</code>
openssl  s_client  annoyance  solution 
9 days ago
Bashhub · Every command. |
Hope there are no passwords or API keys in your history.
sysadmin  linux  unix  bash  history  cloud  cloudstorage  searchengine 
13 days ago
GNU Core Utilities Frequently Asked Questions -
<code class="language-bash"> alias del='mv --verbose --backup=simple --suffix=$(date +".(%F_%T)") --target-directory=$HOME/.Trash/'</code>

See also:
linux  storage  extfs  ext2fs  ext3fs  ext4fs  undelete  reference 
14 days ago
GNU Core Utilities Frequently Asked Questions -
The GNU chown program will change the ownership if the operating system it is running upon allows it. If you can’t change file ownership then it is the operating system which is restricting you and not the chown program.

Actually, the GNU chown command does not know if this is the policy of the system or not. It calls the kernel system call chown() just like any other program (e.g. perl, ruby, etc.) If the OS allows it then it will change the ownership of the file. Different systems handle this differently. Traditional System V Unix systems allow anyone to give a file away to other owners. On those systems GNU chown does change the ownership of files.

But on most modern systems BSD semantics are followed and only the superuser can change the ownership of the file. The problem for documenting this is that GNU chown does not know which it will be running on. It could be one or it could be the other. Or it might even be running on a system without the concept of file ownership at all! This is really an OS policy decision and it is hard to track documentation to be different on different systems. But the documentation must be independent of operating system.

The reason an operating system needs to restrict changing ownership is mostly threefold.

A user can create files that they cannot remove. With the old semantics it was possible for normal users to create situations that only the superuser could fix, such as creating a non-writable directory of files and then giving the ownership away. Since they no longer own the files they can’t change them, nor can they remove them. This is commonly a problem when untaring files that other people created with restrictive file permissions. The new semantics avoid this problem entirely. Therefore most systems today have been changed to disallow giving file ownership away. But as noted it has not always been that way.
Additionally systems need to restrict who can remove files from system temporary directories such as /tmp. Otherwise anyone could remove any file there which might disrupt system processes. Some programs might even have security issues associated with this. Therefore modern systems set the ’sticky’ bit on /tmp. This is the ’t’ bit. On directories this prevents users from removing or renaming a file unless they own the file or directory. The reason this is important is that if chown is allowed then /tmp is another place that a file could be created by a user, chowned, and then could not be removed by the user. A sticky /tmp and a restricted chown policy go together. If you have one then you should have the other as well.
People have used this to avoid disk space quota restrictions. Give the file to someone either with disk quota to spare or without any quota restrictions, like root. You can always copy the files back and then you own them again. This effectively defeats any quota system if allowed. Also, you can deny someone else service with a denial of service attack by using all of their quota until they cannot create any files. You use up their quota by chowning files to them someplace where they cannot find them.
gnu  linux  coreutils  chown  permissions  unix  sothatswhy 
14 days ago
Hashing it Out in PowerShell: Using Get-FileHash |
Windows 7, even with all the updates, only has PowerShell 2.0, so no 'get-filehash' for Windows 7.
PowerShell 4.0 introduced a new cmdlet, Get-FileHash, primarily for use with Desired State Configuration (DSC). In a pull server configuration, you need to provide file hashes so that servers can recognize changes. That is the primary purpose of a file hash as far as I am concerned is for file integrity. Windows supports several different hashing algorithms, which you should not confuse with encryption.
powershell  hash  checksum  crypto  windows  win7  shellscripting 
14 days ago
lucasg/powershell-docset: A dash docset for powershell modules : |
Get a release, and then extract the .tgz for a specific version, then move the "Powershell.docset" directory into ~/.local/share/Zeal/Zeal
zeal  dash  velocity  docset  powershell  devel  reference  solution 
14 days ago
How to add separator in powershell - Stack Overflow
Basically, use 'export-csv' or 'converto-csv' with a '-delimiter' option.
csv  windows  powershell  shellscripting  textprocessing  newbie  solution 
14 days ago
How do I concatenate strings and variables in PowerShell? - Stack Overflow
This was my solution:

<code class="lang-powershell">gci -recurse -include *.exe,*.msi |
%{ get-filehash $_ -a SHA1 } |
%{ write-host $(
$_.hash + " " +
$(Resolve-Path -Relative $_.path | %{$_ -split "\\" -join "/"})
powershell  stringmanipulation  textprocessing  shellscripting  syntax  solution 
14 days ago
.net - What does $_ TRULY mean in PowerShell? - Stack Overflow
The $_ is only created in the context of a pipeline, that is the passing of output objects from one command into the "input" of another. For pipeline filters (which are like functions), powershell automatically populates the $_ variable with the current object of the pipeline. Now I say current because it is important to note that when multiple objects are passed down the pipeline, the process scriptblock of your filter is executed once per object.
windows  powershell  shellscripting  iteration  pipes  syntax  newbie  solution 
14 days ago
syntax - What does "%" (percent) do in PowerShell? - Stack Overflow
When used in the context of a cmdlet (such as your example), it's an alias for ForEach-Object:
windows  powershell  shellscripting  syntax  newbie  solution 
14 days ago
The Complete Guide to PowerShell Punctuation - Simple Talk
Backtick is backslash, basically, including for line continuation. Bad choice if you ask me, because it's not visually distinctive enough. It looks like crumbs in your code.
powershell  windows  shellscripting  syntax  grammar  explained  reference  newbie 
14 days ago
How to get a comma separated table of installed Windows programs using PowerShell? - Stack Overflow
<code class="lang-powershell">Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* |
Select-Object DisplayName, DisplayVersion |
ConvertTo-Csv -NoTypeInformation</code>
windows  sysadmin  softwaremanagement  powershell  shellscripting  solution 
14 days ago
« earlier      
per page:    204080120160

Copy this bookmark:

to read