recentpopularlog in

kme : movein   254

« earlier  
retext/configuration.md at master · retext-project/retext | https://github.com/
hideToolBar (boolean) - whether to hide the toolbars from the UI (default: false)
tabBarAutoHide (boolean) - whether to hide the tabs bar when only one tab is open (default: false)
useFakeVim (boolean) - whether to use the FakeVim editor, if available (default: false)
retext  markdown  linux  vikeybindings  configfile  configsettings  essential  movein  solution 
20 days ago by kme
How To Disable AutoRun / AutoPlay In Windows 7 & Windows 8 | Redmond Pie
Create one of these two registry keys (all users or current user):
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\policies\Explorer\

Step 3: Within this subkey, locate the setting labeled “NoDriveTypeAutoRun”. If it doesn’t exist, create a new 32-bit DWORD with this name and assign it the hexadecimal value 000000FF (Decimal 255).
windows  win7  win8  win10  autorun  autoplay  security  movein  howto 
24 days ago by kme
How to Prevent .DS_Store File Creation
<code class="language-bash">defaults write com.apple.desktopservices DSDontWriteNetworkStores true</code>

See also: https://hints.macworld.com/article.php?story=2005070300463515
mac  macos  finder  annoyance  defaults  movein 
6 weeks ago by kme
How to specify shell for vim? - Super User
I don't understand why this was necessary; my shell was already set to the MacPorts version of Bash, but MacVim was running /bin/sh instead.

<code class="language-vim">set shell=/path/to/zsh</code>
macvim  macos  vim  annoyance  configfile  movein  solution 
8 weeks ago by kme
vscode settings - Vertical rulers in Visual Studio Code? - Stack Overflow
VS Code 0.10.10 introduced this feature. To configure it, go to File > Preferences > Settings and add this to to your user or workspace settings:
<code class="language-json">"editor.rulers": [80,120]</code>

The color of the rulers can be customized like this:
<code class="language-json">"workbench.colorCustomizations": {
"editorRuler.foreground": "#ff4081"
}</code>
vscode  wrapmargin  80columns  essential  movein  solution 
8 weeks ago by kme
Parcellite indicator in Ubuntu 13.10 - Ask Ubuntu | https://askubuntu.com/
It seems that a fork of Parcellite is available and this fork supports does provide an indicator for Unity:

Parcellite with Ubuntu AppIndicator? ClipIt!


Links to: http://www.webupd8.org/2011/01/parcellite-has-new-developer-and-new.html
linux  clipboardmanager  clipboard  history  utility  essential  alternativeto  diodon  movein 
10 weeks ago by kme
perldebug - perldoc.perl.org
Put this in ~/.perldb to get a persistent history between sessions:
<code class="language-perl">parse_options("HistFile=$ENV{HOME}/.perldb_history HistSize=1000");</code>
perldb  debugger  configfile  history  essential  movein  solution 
10 weeks ago by kme
XTerm introduction and TrueType fonts configuration
My ~/.Xdefaults
<code class="language-xdefaults">! source: http://futurile.net/2016/06/14/xterm-setup-and-truetype-font-configuration/
xterm*background: Black
xterm*faceName: Input Mono
xterm*faceSize: 12
xterm*foreground: grey
! enables "UTF-8 Encoding" and "UTF-8 Fonts" menu options
xterm*locale: UTF-8

xterm*VT100.Translations: #override \
Shift <KeyPress> Insert: insert-selection(CLIPBOARD) \n\
Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\
Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
Ctrl <Btn1Up>: exec-formatted("xdg-open '%t'", PRIMARY)</code>
x11  xterm  configuration  xrdb  xresourcess  howto  macos  osx  xquartz  solution  fuckina  essential  movein 
11 weeks ago by kme
macos - How to run mvim (MacVim) from Terminal? - Stack Overflow
My solution: add /Applications/MacVim.app/Contents/bin to the PATH.
macvim  macos  console  terminal  cli  movein  solution 
september 2019 by kme
How to Show the Expanded Print Details Dialog in Mac OS by Default
<code class="language-bash">defaults write -g PMPrintingExpandedStateForPrint -bool TRUE</code>
macos  mojave  10.14  defaults  essential  movein  annoyance  printing 
september 2019 by kme
Disable Dock Bouncing in Mac OS X
<code class="language-bash">defaults write com.apple.dock no-bouncing -bool TRUE</code>
macos  defaults  solution  dock  animation  movein 
september 2019 by kme
MartinHarding/macOSuckless: Scripts, commands, hacks, and tweaks to make macOS suck less.
<code class="language-bash">
# always show the detailed Print dialog
# source: http://osxdaily.com/2018/03/19/show-expanded-print-details-dialog-mac-default/
defaults write -g PMPrintingExpandedStateForPrint -bool TRUE

# Unhide Library folder
# (might require a restart)
chflags nohidden ~/Library

# Expand Save Panel by default
defaults write -g NSNavPanelExpandedStateForSaveMode -bool true
defaults write -g NSNavPanelExpandedStateForSaveMode2 -bool true

# Set Dock size and make it unchangeable
defaults write com.apple.dock tilesize -int 48
defaults write com.apple.dock size-immutable -bool true
killall Dock

# Dim Dock icon when application is hidden
defaults write com.apple.dock showhidden -boolean true
killall Dock

# Add a blank space to the end of Dock
defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
killall Dock

# Disable shadows on window screenshots
defaults write com.apple.screencapture disable-shadow -bool true
killall SystemUIServer

# Disable animations when you open an application from the Dock.
defaults write com.apple.dock launchanim -bool false

# disable bounce animation when application wants attention
# source: http://osxdaily.com/2010/02/19/disable-dock-bouncing/
defaults write com.apple.dock no-bouncing -bool TRUE

# Make all animations faster that are used by Mission Control.
# (not sure if this does anything, actually)
defaults write com.apple.dock expose-animation-duration -float 0.1

# Fixes an issue with some applications that have poor smoothing in Mojave when not running on Retina monitors.
# (not sure how much good this actually does)
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
</code>
macos  osx  dotfiles  defaults  annoyances  movein  essential 
september 2019 by kme
Disable the New Window Animation in Mac OS X
<code class="language-bash">defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO</code>
window  animation  dialogbox  defaults  movein  essential  macos  mojave  10.14  solution 
september 2019 by kme
How to Show to ~/Library Folder in MacOS Mojave, High Sierra, Sierra
Choose “Show Library Folder” in the settings options for the User home folder
finder  libraryfolder  mac  osx  mojave  10.14  tipsandtricks  essential  movein  solution 
september 2019 by kme
How to Use Only a Dark Menu Bar and Dock in macOS Mojave
It's not perfect (Notification Center looks like ass, for example), but it's good enough for government work.

<code class="language-bash">defaults write -g NSRequiresAquaSystemAppearance -bool Yes</code>
macos  mojave  darkmode  dock  menubar  customization  solution  fuckina  10.14  movein 
august 2019 by kme
windows - Run Python scripts in PowerShell directly - Super User
Edit the PATHEXT environment variable and add the .py extension.

Just add this line to your powershell profile:
<code class="language-powershell">$env:PATHEXT += ";.py"</code>

or you could just edit PATHEXT globally using the system settings (just start menu search for "Edit Environment variables for your account").


See https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles; the MS TechNet article linked in the approved answer is looooong dead.
python  powershell  windows  cli  commandline  pathext  path  environmentvariable  shellscripting  solution  essential  movein  configuration 
august 2019 by kme
tmux windows and pane split's on current directory (Example)
Apparently this behavior changed in 1.9, but the link to the changelog in this article is broken.

<code>bind-key c new-window -c "#{pane_current_path}"
bind-key % split-window -h -c "#{pane_current_path}"
bind-key '"' split-window -v -c "#{pane_current_path}"</code>
tmux  movein  config  dotfile  fuckina  solution 
august 2019 by kme
7 Tips - Tuning Command Line History in Bash - ShellHacks
There's nothing here that isn't in the manual, but it's a concise reference that's all in one place. Every 'shopt' and 'HISTCONTROL' option listed here seems to be supported in Bash 4.1 and above (this means CentOS 6).

The 'PROMPT_COMMAND' example, though, would clobber an existing PROMPT_COMMAND, so do it like this instead:
<code class="language-bash">PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND; }history -a"</code>
bash  history  histfile  configfile  dotfile  essential  movein  reference 
july 2019 by kme
yest download | SourceForge.net
Needs to be modified to support 'now', or 'today' as starting time/dates.
Download yest for free. This is a command line date/time manipulation and formatting program, very useful in scripts. You can easily add or subtract days, hours and/or minutes from a specified date.
timeanddate  unix  c  shellscripting  commandline  essential  movein  needshelp 
june 2019 by kme
Search for visually selected text | Vim Tips Wiki | FANDOM powered by Wikia
Create file (for example) ~/.vim/plugin/vsearch.vim (Unix) or $HOME/vimfiles/plugin/vsearch.vim (Windows) with contents:

<code class="language-viml">" Search for selected text.
" http://vim.wikia.com/wiki/VimTip171
let s:save_cpo = &cpo | set cpo&vim
if !exists('g:VeryLiteral')
let g:VeryLiteral = 0
endif
function! s:VSetSearch(cmd)
let old_reg = getreg('"')
let old_regtype = getregtype('"')
normal! gvy
if @@ =~? '^[0-9a-z,_]*$' || @@ =~? '^[0-9a-z ,_]*$' && g:VeryLiteral
let @/ = @@
else
let pat = escape(@@, a:cmd.'\')
if g:VeryLiteral
let pat = substitute(pat, '\n', '\\n', 'g')
else
let pat = substitute(pat, '^\_s\+', '\\s\\+', '')
let pat = substitute(pat, '\_s\+$', '\\s\\*', '')
let pat = substitute(pat, '\_s\+', '\\_s\\+', 'g')
endif
let @/ = '\V'.pat
endif
normal! gV
call setreg('"', old_reg, old_regtype)
endfunction
vnoremap <silent> * :<C-U>call <SID>VSetSearch('/')<CR>/<C-R>/<CR>
vnoremap <silent> # :<C-U>call <SID>VSetSearch('?')<CR>?<C-R>/<CR>
vmap <kMultiply> *
nmap <silent> <Plug>VLToggle :let g:VeryLiteral = !g:VeryLiteral
\\| echo "VeryLiteral " . (g:VeryLiteral ? "On" : "Off")<CR>
if !hasmapto("<Plug>VLToggle")
nmap <unique> <Leader>vl <Plug>VLToggle
endif
let &cpo = s:save_cpo | unlet s:save_cpo</code>
vim  searching  searchandreplace  tipsandtricks  essential  movein  vimscript 
june 2019 by kme
How to display system tray icons in elementary OS Juno? - elementary OS Stack Exchange | https://elementaryos.stackexchange.com/
The necessary 'indicator-application' package seems to be in the repositories for Juno; all that was probably actually required is
$ sudo nano /etc/xdg/autostart/indicator-application.desktop

find the line

OnlyShowIn=Unity;GNOME;

and add Pantheon

OnlyShowIn=Unity;GNOME;Pantheon;
elementaryos  juno  indicator  icons  appindicator  panelindicators  annoyance  movein  sortof  solution 
may 2019 by kme
A nice default screenrc · GitHub
A nice default screenrc. GitHub Gist: instantly share code, notes, and snippets.
screen  screenrc  configfile  dotfile  movein  newbie  terminalmultiplexer 
may 2019 by kme
A ~/.inputrc for Humans - Top Bug Net | https://www.topbug.net/
<code class="language-inputrc">
$include /etc/inputrc
"\C-p":history-search-backward
"\C-n":history-search-forward

set colored-stats On
set completion-ignore-case On
set completion-prefix-display-length 3
set mark-symlinked-directories On
set show-all-if-ambiguous On
set show-all-if-unmodified On
set visible-stats On
</code>

I would add these, too:
<code class="language-inputrc">
$if mode=vi
set keymap vi-command
# these are for vi-command mode
"\e[A": history-search-backward
"\e[B": history-search-forward

set keymap vi-insert
# these are for vi-insert mode
"\e[A": history-search-backward
"\e[B": history-search-forward

# source: https://brettterpstra.com/2015/07/09/shell-tricks-inputrc-binding-fun/
"\e[1;5C": forward-word
"\e[1;5D": backward-word
$endif
</code>
bash  commandline  editing  configfile  dotfile  movein  essential  newbie  inputrc  readline 
april 2019 by kme
How can I disable searching and domain guessing from the Firefox Address Bar, while keeping other features? - Super User | https://superuser.com/
The settings mentioned in the accepted answer will prevent, for example, 'localhost' from redirecting to 'localhost.com', but this still doesn't stop Firefox from trying to visit a non-existent web site if your search term has a period in it. So a search like "vcruntime140.dll" will still assume that ".dll" is a TLD.

However, I blindly discovered that putting a "?" at the beginning of the query is enough to turn of hostname detection, and pressing Ctrl+K will do that, and focus the Awesome Bar for you.

See also: https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly#w_search and https://support.mozilla.org/en-US/kb/awesome-bar-search-firefox-bookmarks-history-tabs#w_how-can-i-control-what-results-the-address-bar-shows-me (section called "Changing results on the fly").
Go to about:config and set the following preferences to false:

browser.fixup.alternate.enabled

True (default): Try to fix up http://foo to http://(prefix)foo(suffix)
False: Do not second-guess the user
firefox  search  awesomebar  configsetting  annoyance  url  toosmart  solution  configuration  customization  movein  sortof  workaround 
april 2019 by kme
readline - python tab completion Mac OSX 10.7 (Lion) - Stack Overflow | https://stackoverflow.com/
Putting this in a ~/.pythonrc works for Python >= 3. Python 2.7.x seems to require that you set PYTHONSTARTUP=~/.pythonrc in your login scripts.

<code class="language-python">import readline
import rlcompleter
if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
else:
readline.parse_and_bind("tab: complete")</code>
python  macos  osx  repl  tabcompletion  autocompletion  annoyance  configfile  essential  movein 
march 2019 by kme
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 
march 2019 by kme
bash - How to expand filenames with Tab, even when a shell variable is used in the path? - Unix & Linux Stack Exchange | https://unix.stackexchange.com/
The solution is 'shopt -s direxpand' in Bash 4.2 or later. This is (supposedly) the default on 4.1 and earlier. I learned that "Ctrl+Alt+E" does something cool when you 'set -o emacs', though:
For example, typing less $lh/acc then hitting Tab will expand to: less \$lh/access_log.

Of course, what I would like instead is less $lh/access_log or even less /var/log/httpd/access_log. (weirdly, with the cd command the autocomplete doesn't work at all in that case, this question already talks about it)

I know that there is an alternative by using shell-expand-line (default key: Ctrl+Alt+E), but it's far from perfect because it expands aliases as well, and it doesn't quote paths with special chars (spaces, ...).
bash  tabcompletion  movein  configfile  interesting 
february 2019 by kme
linux - bash: variable name not being expanded with Tab completion - Super User | https://superuser.com/
shopt -s direxpand will make echo $HOME/<tab> expand to echo /home/matt/ in bash 4.2. In bash 4.1 it should be the default.
bash  tabcompletion  bashcompletion  commandline  shell  configfile  essential  movein  annoyance  solution  fuckina 
february 2019 by kme
You can make readline (and bash) much more user friendly by adding a few options to ~/.inputrc : commandline | https://www.reddit.com/
set completion-prefix-display-length 2

This one is insanely useful when you have a folder with lots of similarly named files and you are not sure how far the completion has gone when you press TAB. The first part that has been completed will be replaced by "...", and it is simple to see what you need to type to finish the completion.
inputrc  input  readline  bash  cli  configfile  configsettings  example  newbie  movein  essential 
october 2018 by kme
Remember all your bash history forever | http://jesrui.sdf-eu.org/
WATCH OUT! Old-ass versions of Bash (4.1.x on CentOS 6, for example) will truncate your damn history file if you use HISTFILESIZE=-1 or HISTSIZE=-1.
Append the following lines to /etc/bash.bashrc:
<code class="language-bash">HISTTIMEFORMAT='%F %T '
HISTFILESIZE=-1
HISTSIZE=-1
HISTCONTROL=ignoredups
HISTIGNORE=?:??
shopt -s histappend # append to history, don't overwrite it
# attempt to save all lines of a multiple-line command in the same history entry
shopt -s cmdhist
# save multi-line commands to the history with embedded newlines
shopt -s lithist</code>

This configures bash to save every command line typed at the interactive shell prompt (HISTFILESIZE) to ~/.bash_history (default), including a timestamp (HISTTIMEFORMAT) and ignoring consecutive duplicate entries (HISTCONTROL). By setting HISTSIZE to the same value as HISTFILESIZE, all saved commands are read back to memory when a new interactive shell starts. The default value for HISTSIZE (500) would load only a fraction of the saved history.

When saving the history at shell exit, history lines are appended to existing ones, instead of replacing them (shopt -s histappend).

By setting HISTIGNORE=?:??, lines consisting of just one or two characters are discarded from the history (e.g. ls commands).
bash  history  tipsandtricks  configsettings  essential  movein  bashrc 
october 2018 by kme
Bash Reference Manual: Bash History Builtins | https://www.gnu.org/
A useful alias to use with the fc command is r='fc -s', so that typing ‘r cc’ runs the last command beginning with cc and typing ‘r’ re-executes the last command (see Aliases).
bash  history  tipsandtricks  bashrc  bash_aliases  movein  essential 
october 2018 by kme
linux - How to show line number when executing bash script - Stack Overflow | https://stackoverflow.com/
<code class="language-bash">export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'</code>
bash  shellscripting  devel  debugging  configfile  movein  tipsandtricks  solution 
august 2018 by kme
Extension:PlaceNewSection - MediaWiki | https://www.mediawiki.org/
You need to add __ADDNEWSECTIONBELOW__ and __NEWSECTIONLINK__ to your article (if it's outside the "Talk" namespace) in order to get this working. But it works!

Other useful references:

* https://phabricator.wikimedia.org/T122884 - (Make it possible to) always ignore NEWSECTIONLINK in mainspace at the English Wikipedia
* https://www.mediawiki.org/wiki/Help:Magic_words
* https://en.wikipedia.org/wiki/MediaWiki:Gadget-addsection-plus[.js]
* https://en.wikipedia.org/wiki/MediaWiki:Gadgets-definition
mediawiki  editing  extension  movein  essential  fuckina  solution 
may 2018 by kme
Manual:Short URL/Apache - MediaWiki | https://www.mediawiki.org/
In the Apache config (for the vhost or whatever):
<code class="language-apache">## http://www.mediawiki.org/wiki/Manual:Short_URL/Apache

# Enable the rewrite engine
RewriteEngine On

# Short URL for wiki pages
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]

# Redirect / to Main Page
RewriteRule ^/*$ %{DOCUMENT_ROOT}/w/index.php [L]
</code>

In 'LocalSettings.php':
<code class="language-php">
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/w"; // this should already have been configured this way
$wgArticlePath = "/wiki/$1";
</code>
mediawiki  essential  movein  shorturl  configfile  webmaster  apache  solution 
may 2018 by kme
Extension:LinkTarget - MediaWiki | https://www.mediawiki.org/
Allows specifying external link targets with a specific class on the parent div.
mediawiki  linktarget  link  html  extension  essential  movein 
march 2018 by kme
UNC links - MediaWiki | https://www.mediawiki.org/
<code class="language-wikitext">[file:///{{#replace:{{#replace:{{{1}}}| |%20}}|\|/}} {{#if:{{{2|}}}|{{{2}}}}}]</code>
mediawiki  windows  networking  cifs  unc  fileprotocol  customization  essential  movein  sysadmin 
march 2018 by kme
How can I shortern my command line prompt's current directory?
It doesn't work on OSX with bash as shipped from Apple (I'm on Mountain Lion). The shipped version is 3.2.48(1)-release. If you install the latest bash using something like Homebrew, you'll get something in the neighborhood of 4.2.45(2)-release, which does support PROMPT_DIRTRIM.
Downside: It depends on the directory level, not the length of the path, which you might not want.

Upside: It's very simple. Just add export PROMPT_DIRTRIM=2 to your .bashrc.
bash  promptstring  bashrc  configfile  tipsandtricks  movein  solution 
december 2017 by kme
Enable Tab Completion for SSH Aliases
Blog formatting gremlins ate a bunch of extra backlashes, so you can't just copy-and-paste. The correct version with the missing backslashes is:

<code class="language-bash">
complete -o default -o nospace -W \
"$(/usr/bin/env ruby -ne 'puts $_.split(/[,\s]+/)[1..-1].reject{|host| host.match(/\*|\?/)} if $_.match(/^\s*Host\s+/);' < $HOME/.ssh/config)" \
scp sftp ssh
</code>
bash  essential  movein  ssh  configfile  tabcompletion  bashcompletion  solution 
december 2017 by kme
Alternative way to clear search · Issue #131 · tpope/vim-sensible
I like mapping to <CR> because I can still use <Ctrl>+L for vim-tmux-navigator, but I prefer Tim's way of clearing the search, because you can still use n/N to pick up where you left off, after clearing the highlighting.

<code class="language-vim">
set incsearch
" Use <C-L> to clear the highlighting of :set hlsearch.
if maparg('<C-L>', 'n') ==# ''
nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
endif
</code>
I don't know where I found this but I did quite some research on the topic and it turns out the best way is to do:

<code class="language-vim">
nnoremap <CR> :let @/ = "" <bar> echo "search string cleared whatever" <CR>
</code>

This being if you want the mapping to be on Enter, which I find really useful

I can't back this up with anything except that it works and doesn't break anything else, but I thought it would be useful.
searching  vim  configfile  tipsandtricks  movein  solution 
december 2017 by kme
« earlier      
per page:    204080120160

Copy this bookmark:





to read