recentpopularlog in
« earlier  
regro/conda-metachannel: like a conda-metapackage but for channels! | https://github.com/
like a conda-metapackage but for channels! Contribute to regro/conda-metachannel development by creating an account on GitHub.

Via: https://github.com/conda/conda/issues/7239
conda  conda-forge  bandaid  itsslow  workaround  maybesolution 
20 hours ago
ERROR : Base home directory does not exist within the container - Google Groups | https://groups.google.com/
This worked for me, but the kernel on our cluster is too old:

<code class="language-bash">
singularity shell --no-home docker://centos:7
</code>
singularity  errormessage  workaround  solution 
21 hours ago
use of alternation "|" in sed's regex - Super User | https://superuser.com/
<code style="language-bash">echo "blia blib bou blf" | sed 's/bl\(ia\|f\)//g'</code>
sed  shellscripting  textprocessing  syntax  newbie  dammitbrain  solution 
2 days ago
linux - How to use sed to remove the last n lines of a file - Stack Overflow | https://stackoverflow.com/
Yeah, it's possible in 'sed', but ugly.

<code class="language-bash">head -n -2 myfile.txt</code>
bash  linux  sed  shellscripting  textprocessing  solution 
2 days ago
ruby on rails - How can I remove a default gem? ! want to uninstall a gem 1.7.7 version of json - Stack Overflow | https://stackoverflow.com/
I had to remove the (duplicate) '<ruby_install_dir>/lib/ruby/gems/<ruby_major_ver>/specifications/default/json-x.y.z.gemspec' file from my specifications/default directory.

The top-rated answer was confusingly verbose, but it did contain the solution in there, somewhere.
ruby  rubygems  errormessage  annoyance  solution 
2 days ago
Error installing json 1.8.3 with ruby 2.4 - Stack Overflow | https://stackoverflow.com/
I did <code class="language-bash">gem install -v 1.8.6 json</code> and it worked.
I ran into the same issue recently as well, try and see if there's a newer version of whatever gem you're using that depends on json 1.8.3. This is happening because Ruby 2.4 unified Fixnum and Bignum into Integer. If you're able to upgrade to json 1.8.5 or higher, it should help fix your problems.
ruby  annoyance  errormessage  rubygems  gem  solution 
2 days ago
history - Why is the xargs -i option deprecated? - Unix & Linux Stack Exchange | https://unix.stackexchange.com/
This makes me feel old, because I remember when 'xargs' *only* had '-i' and '-l', and this change feels completely arbitrary to me.
The -l and -i options appear in the 1997 version of the POSIX standard, but do not appear in the 2004 version of the standard. Therefore you should use -L and -I instead, respectively.
xargs  unix  shellscripting  posix  explained  solution 
2 days ago
GitHub - antocuni/pdb | https://github.com/
Contribute to antocuni/pdb development by creating an account on GitHub.
python  debugger  addon  extension  essential  movein 
2 days ago
encryption - LUKS and loop device - Ask Ubuntu | https://askubuntu.com/
For me, what worked was:

<code class="language-bash">
head -c 100M /dev/zero > crypt
sudo cryptsetup luksFormat crypt
sudo cryptsetup luksOpen crypt
sudo mke2fs /dev/mapper/c1

# then mount with the file manager
</code>

Finally:
<code class="language-bash">
sudo cryptsetup luksClose filecontainer
</code>
crypto  blockdevice  storage  linux  howto  sortof  solution  alternativeto  truecrypt 
5 days ago
pipe - cryptsetup: Attaching loopback device failed - Unix & Linux Stack Exchange | https://unix.stackexchange.com/
It seems that cryptsetup requires the LUKS header to be either regular file or device. If you need to provide the LUKS header as an output from a process/stream, you can easily circumvent the restriction by sending it to /dev/ram
<code class="language-bash">
cat LUKS-HEADER > /dev/ram0
</code>

(provided that your kernel supports ramdisk)

Then you can then simply use your cryptsetup command as:
<code class="language-bash">
cryptsetup luksOpen /dev/sdb1 sdb1 --header /dev/ram0
</code>

Keep in mind, the LUKS header will stay in /dev/ram0 disk until you free up the space. To free up the memory, you can use the blockdev command:
<code class="language-bash">
blockdev -v --flushbufs /dev/ram0
</code>
luks  crypto  blockdevices  linux  unix  sysadmin  tipsandtricks 
5 days ago
Java Future Release Notices | https://www.java.com/
Good job, Larry Ellison. Now everyone will be running insecure versions of Java forever, and you just wrote Java's death warrant in the process.
oracle  java  jdk  devel  licensing  updates 
5 days ago
linux - how to kill the tty in unix - Stack Overflow | https://stackoverflow.com/
This was essentially what I needed
<code class="language-bash">ps -ft pts/6 -t pts/9 -t pts/10</code>

And my actual command line looked like this:
<code class="language-bash">
# probably could've done this with just 'who -al' instead of who + ps
who | grep userid \
| awk '{print $2}' \
| parallel 'ps -ft {} \
| tail -n +2' \
| awk '{print $2}'
| xargs kill -HUP</code>

And with some refinement, I was able to do something like this:
<code class="language-bash">
who -al | grep old \
| awk '{print $7}' \
| sudo xargs kill -HUP</code>

Also:
I had the same question as you but I wanted to kill the gnome terminal which I was in. I read the manual on "who" and found that you can list all of the sessions logged into your computer with the '-a' option and then the '-l' option prints the system login processes.
<code class="language-bash">who -la</code>

Also:
<code class="language-bash">pkill -9 -t pts/0</code>
unix  linux  sysadmin  pseudoterminal  processmanagement  solution 
6 days ago
lubridate 1.7 does not compile under RHEL 6.6 · Issue #608 · tidyverse/lubridate · GitHub | https://github.com/
I can install 1.6 from source without a problem, but 1.7 throws errors and won't compile. In file included from ./cctz/include/civil_time.h:18, from update.cpp:2: ./cctz/include/civil_time_detail.h:37: error: expected nested-name-specifi...
r  library  lubridate  tidyverse  centos6  compiler  errormessage  solution 
6 days ago
Manual:Image administration - MediaWiki | https://www.mediawiki.org/
Animated GIFs don't scale with the built in PHP routines. And yet the cached (broken) thumbnails aren't refreshed without expiring the cache.

This combination of stuff was required after I discovered that I had to enable ImageMagick in order to get thumbnails of GIFs:

<code class="language-php"># source: https://www.mediawiki.org/wiki/Manual:Image_administration#Image_thumbnailing
# this should enable scaling of GIF images; built-in PHP routines won't
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = '/usr/bin/convert';

# if rendered thumbnails are older than this timestamp, they are regenerated
# copy-pasted from https://www.mediawiki.org/wiki/Manual:$wgCacheEpoch
$wgThumbnailEpoch = 20190314215957;
$wgCacheEpoch = 20190314215957;

# temporarily remove shell time and memory limits (if necessary)
# source: https://www.mediawiki.org/wiki/Manual:$wgMaxShellMemory
#$wgMaxShellTime = 0;
#$wgMaxShellMemory = 0;
</code>
mediawiki  images  uploads  multimedia  animatedgifs  imagemagick  configfile  annoyance  solution 
6 days ago
Vim digraphs cheatsheet | https://devhints.io/
The one-page guide to Vim digraphs: usage, examples, links, snippets, and more.
vim  specialcharacters  digraphs  cheatsheet  quickreference 
6 days ago
Mapping keys in Vim - Tutorial (Part 1) | Vim Tips Wiki | FANDOM powered by Wikia | https://vim.fandom.com/
So put these lines in ~/.vim/after/ftplugin/mediawiki.vim in order for 'j' and 'k' to just "do what I mean" in MediaWiki / Markdown source files.
The following commands map the 'j' key to execute 'gj' and the 'k' key to execute 'gk'. These are useful for moving between long wrapped lines.

<code class="language-viml">:nnoremap k gk
:nnoremap j gj</code>
vim  keymap  remapping  configfile  essential  movein 
7 days ago
Animated images - MozillaZine Knowledge Base | http://kb.mozillazine.org/
Pressing the "Esc" key on Windows (other OS may be different) will pause animated images on the current website. Note: Starting in Firefox 20, this is no longer the case due to the fix for bug 614304 unless resolved in an upcoming patch (see comment 45). The SuperStop add-on by Gavin Sharp (https://addons.mozilla.org/en-US/firefox/addon/superstop/) is an alternate solution.
firefox  gif  animation  annoyance  solution 
7 days ago
linux - Why redirect stdin inside a while read loop in bash? - Stack Overflow | https://stackoverflow.com/
The clear intent here is to prevent do_something from reading from the sample.text stream, by ensuring that its stdin is coming from elsewhere. If you're not seeing differences in behavior with or without the redirection, that's because do_something isn't actually reading from stdin in your tests.

[...]

By the way, I would write this more as follows:
<code class="language-bash">exec 3</dev/tty || exec 3<&0 ## make FD 3 point to the TTY or stdin (as fallback)

while read -a args; do ## |- loop over lines read from FD 0
do_something "${args[@]}" <&3 ## |- run do_something with its stdin copied from FD 3
done <sample.text ## \-> ...while the loop is run with sample.txt on FD 0

exec 3<&- ## close FD 3 when done.</code>

It's a little more verbose, needing to explicitly close FD 3, but it means that our code is no longer broken if we're run with stdout attached to the write-only side of a FIFO (or any other write-only interface) rather than directly to a TTY.
bash  shellscripting  stdin  filedescriptors  epiphany  tipsandtricks  solution 
7 days ago
Blank lines are not preserved. · Issue #48 · janl/mustache.js | https://github.com/
Try the following JS code: var a = Mustache.to_html('{{tag1}}\n\n\n{{tag2}}.\n', {tag1:'Hello', tag2:'World'}, {}); a should contain the string Hello\n\n\nWorld.\n whereas currently it contains the string Hello\nWorld. The problem stems ...
mustache  templates  webdevel  maybesolution  annoyance  bug 
9 days ago
macos - Why CURL return and error (23) Failed writing body? - Stack Overflow | https://stackoverflow.com/

(For completeness and future searches) It 'a matter of how CURL manages the buffer, the buffer disables the output stream with the -N option.
<code class="language-bash">
curl -s -N "URL" | grep -q Welcome
</code>
unix  shellscripting  curl  pipes  errormessage  annoyance  solution 
9 days ago
posix - How to check if stdin is from the terminal or a pipe in a shell script? - Stack Overflow | https://stackoverflow.com/
<code class="language-bash">#!/bin/sh
if [ -t 0 ]; then
echo running interactivelly
else
while read -r line ; do
echo $line
done
fi</code>
bash  shellscripting  stdin  dammitbrain  solution 
11 days ago
g++ compiler for STAR aligner v 2.7.0e - Google Groups | https://groups.google.com/
Google Groups allows you to create and participate in online forums and email-based groups with a rich experience for community conversations.
build  fromsource  c++11  bioinformatics  star  aligner 
11 days ago
MacBook Air (2018) review: Testing the 1.6GHz dual-core Core i5 laptop | Macworld
One of the things we loved about the MacBook Air was the MagSafe charging connector. USB-C charging is convenient in a “you only need one cord” sort of way, but there is almost no old-school Mac laptop user that doesn’t have a dozen stories about how the magnetic breakaway charger saved it from certain doom when someone tripped over the power cord.
macbook  air  review  apple  mac  hardware  explained 
12 days ago
The New MacBook Air Has a Looming Reliability Issue
The MacBook Air is held in high regard for being a well-built laptop that lasts forever. And since the Air has lasted so long, many users (including most of my relatives) have held onto their older models. These systems still work, but they’re finally starting to show their age, leaving their owners looking for a new laptop.
macbook  air  mac  hardware  keyboard  review  explained 
12 days ago
linux - Remove a certain line from Bash history file - Super User | https://superuser.com/
You can achieve removal from the history file using the commandline in two steps:

Typing history -d <line_number> deletes a specified line from the history in memory.
Typing history -w writes the current in-memory history to the ~/.bash_history file.

The two steps together remove the line permanently from the in-memory history and from the .bash_history file as well.
bash  history  security  cya  oops  solution  fuckina 
12 days ago
How to get $HOME directory of different user in bash script? - Stack Overflow | https://stackoverflow.com/
<code class="language-bash">eval echo "~$different_user" # prints $different_user's home dir.</code>
sysadmin  homedirectory  bash  tipsandtricks  solution 
13 days ago
git - .gitignore exclude folder but include specific subfolder - Stack Overflow | https://stackoverflow.com/
To do what you want, you have to “unignore” every parent directory of anything that you want to “unignore”. Usually you end up writing rules for this situation in pairs: ignore everything in a directory, but not some certain subdirectory.
<code class="language-gitignore"># you can skip this first one if it is not already excluded by prior patterns
!application/

application/*
!application/language/

application/language/*
!application/language/gr/</code>
git  gitignore  devel  annoyance  dammitbrain  solution 
13 days ago
pip install --user should check that the user's $PATH is correct · Issue #3813 · pypa/pip | https://github.com/
On Unix, pip install --user ... drops scripts into ~/.local/bin. Historically, this directory has not been on the default Debian/Ubuntu $PATH. This is hopefully on its way to being fixed (bash 4.3-15 is on its way into Debian unstable no...
pip  path  configfile  bashrc  bash_profile  solution  newbie 
13 days ago
alexhsamuel/supdoc: browser for Python API documentation | https://github.com/
browser for Python API documentation. Contribute to alexhsamuel/supdoc development by creating an account on GitHub.
javadoc  python  documentation  docstring  library  alternativeto  sphinx 
14 days ago
alexhsamuel/fixfmt: Fixed-width formatters. | https://github.com/
Fixed-width formatters. Contribute to alexhsamuel/fixfmt development by creating an account on GitHub.
python  cplusplus  data  library 
14 days ago
« earlier      
per page:    204080120160

Copy this bookmark:





to read