Tips and Tricks: Difference between revisions

From tehowiki
Jump to navigation Jump to search
imported>Gfis
lambd(3)
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
===No space left on device===
For MS Windows 10:
net stop "Windows Search"
del %PROGRAMDATA%\Microsoft\Search\Data\Applications\Windows\Windows.edb
net start "Windows Search"
===Positive returncode in makefile===
===Positive returncode in makefile===
  diff -w -y --suppress-common-lines --width=32  bf.tmp pn.tmp '''|| :'''
  diff -w -y --suppress-common-lines --width=32  bf.tmp pn.tmp '''|| :'''
                                                              ^^^^
===Change default codepage of Windows console to UTF-8===
* [https://superuser.com/questions/269818/change-default-code-page-of-windows-console-to-utf-8  chcp 65001]
===Convert MediaWiki to GitHub's MarkDown===
* Script from [https://github.com/philipashlock/mediawiki-to-markdown Philip Ashlock], needs [https://pandoc.org/ PanDoc] and a dump (from <cpde>dumpBackup.php</code>
===Running Delphi programs under Linux===
===Running Delphi programs under Linux===
* Install <code>wine</code> and <code>xvfb</code> for headless terminals.
* Install <code>wine</code> and <code>xvfb</code> for headless terminals.
Line 34: Line 42:
  W: mdadm: no arrays defined in configuration file.
  W: mdadm: no arrays defined in configuration file.
* Apache2: rename all in <code>/etc/apache2/sites-available</code> to <code>*.conf</code>, remove the symlinks in <code>sites-enabled/</code> and recreate them with <code>a2ensite</code>; '''clear the browser cache''' thereafter.
* Apache2: rename all in <code>/etc/apache2/sites-available</code> to <code>*.conf</code>, remove the symlinks in <code>sites-enabled/</code> and recreate them with <code>a2ensite</code>; '''clear the browser cache''' thereafter.
===Raspberry PI keyboard rate ===
* [https://raspberrypi.stackexchange.com/questions/99913/permanently-set-keyboard-repeat-rate-on-raspberry-pi set keyboard rate]
===TP-Link DHCP without Internet===
* [https://forum-raspberrypi.de/forum/thread/47239-mit-wlan-verbunden-aber-kein-internet/ forum-raspberrypi.de]
===Java===
* [https://stackoverflow.com/questions/37628/what-is-reflection-and-why-is-it-useful#:~:text=Java%20Reflection%20makes%20it%20possible,set%20field%20values%20using%20reflection. How to dump any object] by reflection
* [https://stackoverflow.com/questions/27872387/can-a-java-lambda-have-more-than-1-parameter Can a Java lambda have more than 1 parameter]
===Tomcat===
java -cp /usr/share/tomcat8/lib/catalina.jar org.apache.catalina.util.ServerInfo
Server version: Apache Tomcat/8.5.38 (Debian)
Server built:  Feb 26 2019 20:37:51 UTC
Server number:  8.5.38.0
OS Name:        Linux
OS Version:    5.10.103-v7+
Architecture:  arm
JVM Version:    11.0.15+10-post-Raspbian-1deb10u1
JVM Vendor:    Raspbian
===www.domainname===
* Subdomains ''www'' must be enabled in the menue of the hosting service.
* Cf. [https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-apache-on-ubuntu-14-04 How to redirect] for .htacess configuration.
==Git==
git checkout HEAD <filename>
git merge --abort
git reset --hard

Latest revision as of 11:12, 21 October 2023

No space left on device

For MS Windows 10:

net stop "Windows Search"
del %PROGRAMDATA%\Microsoft\Search\Data\Applications\Windows\Windows.edb
net start "Windows Search"

Positive returncode in makefile

diff -w -y --suppress-common-lines --width=32  bf.tmp pn.tmp || :

Change default codepage of Windows console to UTF-8

Convert MediaWiki to GitHub's MarkDown

Running Delphi programs under Linux

  • Install wine and xvfb for headless terminals.
  • For Intraweb applications, determine a free port, for example 8080.
  • Create and fill a MySQL database on the Linux server, and configure that database in the Delphi application.
  • Move the delphi.exe together with libmysql.dll (version 5.59 extracted from a MySQL-Windows-Distribution) to some directory under Linux.
  • xvfb-run wine delphi.exe, then Ctrl-Z and bg
  • Open the application in a browser with the URL http://www.punctum.com:8080/$/.

Perl CPAN

  • perl -MCPAN -e shell, autoconfig follows
  • amend environment:
PATH="/home/User/perl5/bin${PATH:+:${PATH}}"; export PATH;
  (add "/home/User/perl5/bin" to PATH)
PERL5LIB="/home/User/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/User/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/User/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/User/perl5"; export PERL_MM_OPT;
  • install bigint

Rosetta Coding

Debian dist-upgrades

Wheezy to Jessie

  • Ignore:
Setting up makedev (2.3.1-93) ...
/run/udev or .udevdb or .udev presence implies active udev.  Aborting MAKEDEV invocation.
/run/udev or .udevdb or .udev presence implies active udev.  Aborting MAKEDEV invocation.
/run/udev or .udevdb or .udev presence implies active udev.  Aborting MAKEDEV invocation.
  • Ignore:
update-initramfs: Generating /boot/initrd.img-3.2.0-6-amd64
W: mdadm: unchecked configuration file: /etc/mdadm/mdadm.conf
W: mdadm: please read /usr/share/doc/mdadm/README.upgrading-2.5.3.gz .
W: mdadm: no arrays defined in configuration file.
  • Apache2: rename all in /etc/apache2/sites-available to *.conf, remove the symlinks in sites-enabled/ and recreate them with a2ensite; clear the browser cache thereafter.

Raspberry PI keyboard rate

TP-Link DHCP without Internet

Java

Tomcat

java -cp /usr/share/tomcat8/lib/catalina.jar org.apache.catalina.util.ServerInfo
Server version: Apache Tomcat/8.5.38 (Debian)
Server built:   Feb 26 2019 20:37:51 UTC
Server number:  8.5.38.0
OS Name:        Linux
OS Version:     5.10.103-v7+
Architecture:   arm
JVM Version:    11.0.15+10-post-Raspbian-1deb10u1
JVM Vendor:     Raspbian

www.domainname

  • Subdomains www must be enabled in the menue of the hosting service.
  • Cf. How to redirect for .htacess configuration.

Git

git checkout HEAD <filename>
git merge --abort
git reset --hard