configfile   372

« earlier    

linux - How to show line number when executing bash script - Stack Overflow |
<code class="language-bash">export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'</code>
bash  shellscripting  devel  debugging  configfile  movein  tipsandtricks  solution 
6 weeks ago by kme
webdav - How do I enable HTTP-DAV in Apache? - Server Fault |
Yup, I made this mistake, too:
I finally figured it out.

Instead of
<code class="language-apache"><Location /var/www/html/updates>
Dav On

it needs to be (Directory instead of Location)
<code class="language-apache"><Directory /var/www/html/updates>
Dav On
apache  webmaster  configfile  webdav  solution  fuckina 
9 weeks ago by kme
Mailing List Archive: Re: MediaWiki 1.28.0 Extension LDAPAuthentication does not work |
There is a new permission available that governs the right to create accounts when logging in with an external user account. It's called "autocreateaccount" [0]. You have to add to your config something like:
<code class="language-php">$wgGroupPermissions['*']['autocreateaccount'] = true;</code>

Or maybe this is enough:
<code class="language-php">$wgGroupPermissions['user']['autocreateaccount'] = true;</code>

See also
mediawiki  ldap  authentication  config  configfile  solution 
june 2018 by kme
php - Removing X-Powered-By - Stack Overflow |

I think that is controlled by the expose_php setting in PHP.ini:
<code class="language-php">expose_php = off</code>

Decides whether PHP may expose the fact that it is installed on the server (e.g. by adding its signature to the Web server header). It is no security threat in any way, but it makes it possible to determine whether you use PHP on your server or not.

There is no direct security risk, but as David C notes, exposing an outdated (and possibly vulnerable) version of PHP may be an invitation for people to try and attack it.
php  webdevel  webmaster  security  configfile  configuration  solution  dammitbrain 
may 2018 by kme
Change Apache httpd "Server:" HTTP header - Unix & Linux Stack Exchange |
I simply changed the directives in security.conf and Apache started working as I wanted.
<code class="language-apache">
ServerTokens Prod
ServerSignature Off
webmaster  apache  httpd  config  configfile  security  configuration  solution  dammitbrain 
may 2018 by kme
numpy - Automatically import modules when entering the python or ipython interpreter - Stack Overflow |
Use the environment variable PYTHONSTARTUP. From the official documentation:
If this is the name of a readable file, the Python commands in that file are executed before the first prompt is displayed in interactive mode. The file is executed in the same namespace where interactive commands are executed so that objects defined or imported in it can be used without qualification in the interactive session.

python  ipython  ptpython  startup  configfile  solution 
may 2018 by kme
MySQL :: MySQL 8.0 Reference Manual :: 4.5.4 mysqldump — A Database Backup Program |
The "options file handling" options need to come *first* on the command line, otherwise you get an error like what's described in this bug report[1] like "mysql: unknown variable 'defaults-group-suffix=:whatever'"

dba  sysadmin  mysql  mysqldump  configfile  optionsfile  tipsandtricks  errormessage  solution 
may 2018 by kme
Manual:Short URL/Apache - MediaWiki |
In the Apache config (for the vhost or whatever):
<code class="language-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]

In 'LocalSettings.php':
<code class="language-php">
$wgScriptPath = "/w"; // this should already have been configured this way
$wgArticlePath = "/wiki/$1";
mediawiki  essential  movein  shorturl  configfile  webmaster  apache  solution 
may 2018 by kme
vagrantfile - Print message after booting vagrant machine with "vagrant up" - Stack Overflow |
Vagrant now has builtin support for a message to appear after vagrant up. Just add this to your Vagrantfile:

<code class="language-ruby">config.vm.post_up_message = "This is the start up message!"</code>

And then after your VM has come up you'll see this message in green:

<code>==> default: Machine 'default' has a post `vagrant up` message. This is a message
==> default: from the creator of the Vagrantfile, and not from Vagrant itself:
==> default:
==> default: This is the start up message!</code>
vagrant  vagrantfile  provisioning  configfile  solution 
may 2018 by kme
yourls_allow_duplicate_longurls where to set it to allow · Issue #2186 · YOURLS/YOURLS · GitHub |
File: user/config-sample.php:49

<code class="language-php">/** Allow multiple short URLs for a same long URL
** Set to true to have only one pair of shortURL/longURL (default YOURLS behavior)
** Set to false to allow multiple short URLs pointing to the same long URL ( behavior) */
define( 'YOURLS_UNIQUE_URLS', true );</code>

Set it to false in your config file.
php  yourls  configfile  configsetting  solution 
april 2018 by kme
dual boot - How to get grub2 to remember last choice? - Ask Ubuntu -
The documentation in this case is wrong. All variables in /etc/default/grub start with GRUB_, so it's GRUB_DEFAULT=saved, not DEFAULT=saved. I've corrected the Ubuntu wiki to reflect that.

The official grub manual describes this correctly:

Put the following in /etc/default/grub:
<code class="language-bash">

Then run:
<code class="language-bash">
sudo update-grub
linux  windows  grub  grub2  dualboot  bootmanager  configfile  configsetting  dammitbrain  solution 
march 2018 by kme
python - Booleans in ConfigParser always return True - Stack Overflow |
Use getboolean():

<code class="language-python">print config.getboolean('main', 'some_boolean')
print config.getboolean('main', 'some_other_boolean')</code>

From the Python manual:

RawConfigParser.getboolean(section, option)

A convenience method which coerces the option in the specified section to a Boolean value. Note that the accepted values for the option are "1", "yes", "true", and "on", which cause this method to return True, and "0", "no", "false", and "off", which cause it to return False. These string values are checked in a case-insensitive manner. Any other value will cause it to raise ValueError.
python  webdevel  configfile  configparser  solution 
february 2018 by kme
string - Bash: custom PS1 with nice working directory path - Stack Overflow |
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

« earlier    

related tags

aliases  annoyance  apache  authentication  autojump  azupi  backup  backupandrecovery  bash  bashcompletion  bashrc  bootmanager  buffers  bundling  butwhy  cargo  centos  centos6  cloneurl  cm  commandline  commentcharacter  comments  completion  composer  concurrency  config  configini  configparser  configsetting  configuration  confusing  console  consolefont  conversion  converter  credentials  customization  dammitbrain  database  datamunging  davmail  dba  debian  debugging  devel  devops  distributed  docker  dockerfile  documentation  dotfile  dotfiles  dualboot  editor  elementary  elementaryos  encryption  environment  errormessage  essential  ews  exchange  explained  eyecandy  faq  fedora  feerd  fileformat  filetype  fish  flask  framebufferconsole  fuckina  generator  git  gitattributes  gitlab  go  gpg  grub  grub2  hibernate  history  howto  httpd  https  idle  importexport  inifile  initsystem  inputoutput  ipython  irb  java  javascript  jdk  jre  json  jvm  keybindings  language  ldap  library  linter  linux  lp  maybe  maybesolution  mediawiki  memoryusage  mobilecheck  mod_wsgi  modeline  module  modulefile  modules  movein  mysql  mysqldump  nginx  nodejs  npm  openldap  optionsfile  owncloud  package.json  packagemanagement  parser  passwordmanager  pep8  performancetuning  perl  php  plugin  postmaster  powermanagement  powershell  promptstring  provisioning  proxy  ptpython  python  rcfile  readline  reference  repl  reverseproxy  rhel  ruby  rust  searching  security  selinux  serialization  shell  shellscripting  shorturl  sidekiq  smtp  solution  sortof  ssh  ssl  startup  swift  syntastic  syntax  syntaxchecker  syntaxhighlighting  sysadmin  sysadminc  systemd  tabcompletion  templatetoolkit  textediting  texteditor  theme  timezone  tipsandtricks  tmux  toml  transformation  turingcomplete  tutorial  ubuntu  uglify  uwsgi  vagrant  vagrantfile  vgcjs110j  vi  vim  vimode  virtualenv  virtualizationandemulation  vue-resource  vuejs  watchthisspace  webdav  webdevel  webhosting  webmaster  webpack  websockets  windows  wordpress  workaround  yaml  yourls 

Copy this bookmark: