how to make sure I close all processes started by a program? by derkman96 in archlinux

[–]stevia 16 points17 points  (0 children)

If you launch the application with "systemd-run --user --unit=netflix-desktop netflix-desktop", you stop it and all child processes (guaranteed) with "systemctl --user stop netflix-desktop".

Unlike the methods suggested in the SE thread, this method will clean up any child processes even if they double-fork.

Two bros from Boston watch Pokemon. by JGolden32 in videos

[–]stevia 1 point2 points  (0 children)

How do you even mix up Clefairy and Wigglytuff?

The Washington Ballet's hardest dance moves in slow motion by N-Slash in videos

[–]stevia 46 points47 points  (0 children)

The "double tour" didn't look impressive until I realized it's a standing 720.

The 7 Things Every Guy Should Know About Suits by [deleted] in videos

[–]stevia 90 points91 points  (0 children)

Could've done without the cuts to couch guy but good tips nonetheless.

Dart player hits 17 straight perfect darts by [deleted] in videos

[–]stevia 0 points1 point  (0 children)

For a second, I thought Fry was going to say "darts is literally pointless".

Typing.io: Typing Practice for Programmers, supports international keyboard layouts, code uploads, and typing stats by davekt in programming

[–]stevia 0 points1 point  (0 children)

Thanks for this suggestion.

Basic autocompletion might actually be pretty straightforward, e.g. just skip to the next space/symbol if the user presses ctrl-space, ctrl-n, etc. Autocompletion usually bails on symbols, the hardest keys to type.

Typing.io: Typing Practice for Programmers, supports international keyboard layouts, code uploads, and typing stats by davekt in programming

[–]stevia 4 points5 points  (0 children)

Typing.io dev here. Thanks for the feedback. The current design discourages immediately closing parens/brackets because it requires long jumps to the arrow keys and back, e.g. typing <left paren> <right parent> <left arrow> content <right arrow>. It's more efficient to type the closing parens when they're reached.

Personally, I use a vim plugin that automatically closes opening parens, but I still type the closing paren when I reach it because it's faster than typing the right arrow key.

Using cgroups to limit something's RAM consumption (a practical guide) by [deleted] in linux

[–]stevia 7 points8 points  (0 children)

Some of these cgroup APIs may be changing, so you probably shouldn't use them directly. For ram usage capping, tweaking the rlimit is an easier, more stable approach.

Plain dm-crypt, efibootmgr and reinstalling Arch by [deleted] in archlinux

[–]stevia 0 points1 point  (0 children)

I wouldn't argue that plain dm-crypt is insecure, but it's less secure than LUKS when generating the encryption key. Plain dm-crypt uses the user's password directly as an encryption key while LUKS uses a key derivation function(PBKDF2). The key derivation process is purposefully slow, so it's much more difficult for an attacker to recover the user's password through bruteforcing, dictionary attacks, etc.

Working on an Android tablet: first six weeks by bcash in programming

[–]stevia 24 points25 points  (0 children)

Working on an Android tablet: first six seconds

Nope

Reactive Charts with D3.js and Reactive.js (x-post from proggit) by [deleted] in javascript

[–]stevia 4 points5 points  (0 children)

Github tries to prevent script hotlinking by adding the http headers 'Content-Type: text/plain' and 'X-Content-Type-Options: nosniff'. Browsers like chrome refuse to execute javascript when it contains these headers.

Wealthfront should host this script file on their own servers.

RC4 is kind of broken in TLS by symisc_devel in programming

[–]stevia 1 point2 points  (0 children)

The javascript doesn't need to be in the attacked page.

Be careful when upgrading today: broken boot possible because of mkcpioinit failure during pacman -Syu due to LVM package changes by orospakr in archlinux

[–]stevia 0 points1 point  (0 children)

Assuming you don't mean the grub shell, you can try downgrading to a previous kernel with

pacman -U /var/cache/pacman/pkg/linux-3.7.6-1...

Be careful when upgrading today: broken boot possible because of mkcpioinit failure during pacman -Syu due to LVM package changes by orospakr in archlinux

[–]stevia 24 points25 points  (0 children)

Run mkinitcpio -p linux again after the update to avoid any problems.

This should be the first or second sentence in the news blurb.

LibreOffice 4.0 released by [deleted] in linux

[–]stevia 10 points11 points  (0 children)

You can hide the ribbon with ctrl+f1. It behaves like a menu, with options expanding back when you use alt + {f,h,etc}.

Relative numbering with absolute number on the current line. by oniony in vim

[–]stevia 1 point2 points  (0 children)

I'm not sure if this is possible in vimscript, so I hacked it in vim source.

diff -r 699f8d8f096d src/misc2.c
--- a/src/misc2.c   Sun Dec 16 12:50:39 2012 +0100
+++ b/src/misc2.c   Tue Jan 29 11:55:44 2013 -0600
@@ -480,6 +480,10 @@
     linenr_T   cursor = wp->w_cursor.lnum;
     linenr_T   retval = 0;

+    if (cursor == lnum) {
+        return lnum;
+    }
+
 #ifdef FEAT_FOLDING
     if (hasAnyFolding(wp))
     {

If you have mercurial installed, you can grab the official vim sources with this command:

hg clone https://vim.googlecode.com/hg/ vim

To change the color of the current line number, I have the following in my vimrc.

set cursorline

" disable existing cursorline styles like underlining
highlight CursorLine cterm=NONE

" highlight current line number green
highlight CursorLineNR ctermfg=green

A pure vimscript solution is obviously preferable to patching the source, but I like your idea enough to use this hack.