Notepad:Notepad: Difference between revisions

From Amar
Jump to navigationJump to search
Wireguard section
Added samba page
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Unfiled ==
== Unfiled ==
* [[Notepad:Benchmark|Benchmark]]s
* See the whole drive bash tool
  ncdu
* [[Notepad:Mac| Mac Tricks]]
* [[Notepad:Benchmark|Benchmark]]
* [[Notepad:PIX Capture| PIX Capture]]
* [[Notepad:PIX Capture| PIX Capture]]
* [http://lythgoes.net/genealogy/software.php genealogy site building]
* [http://lythgoes.net/genealogy/software.php genealogy site building]
Line 12: Line 15:
* Quicken Payroll : ViewMyPaycheck  Employees Menu > Manage Payroll Cloud Services > CHECK the ViewMyPaycheck box > Enter the PIN > click Save Changes. That's it!
* Quicken Payroll : ViewMyPaycheck  Employees Menu > Manage Payroll Cloud Services > CHECK the ViewMyPaycheck box > Enter the PIN > click Save Changes. That's it!
* Thunderbird User CSS in userChrome.css (roaming profile)
* Thunderbird User CSS in userChrome.css (roaming profile)
<syntaxhighlight lang='css' line>
  #threadTree treechildren::-moz-tree-row(odd) {
  #threadTree treechildren::-moz-tree-row(odd) {
   -moz-appearance: none !important;
   -moz-appearance: none !important;
Line 19: Line 23:
   background-color: Highlight !important;
   background-color: Highlight !important;
  }
  }
</syntaxhighlight>


== Windows ==
== Windows ==
Line 64: Line 69:
Linux stuff I often have to lookup. Just my personal list of things.
Linux stuff I often have to lookup. Just my personal list of things.


* [[Notepad:NFS unload| NFS unload filesystem]]
*[[Notepad:Linux | Linux Tips and Tricks]]
* [[Notepad:mysql slave skip error| mysql slave skip error]]
* [[Notepad:GRUB install| GRUB install]]
* [http://www.enterux.com/en/resources/yahoo-domainkeys-howto-debian Domain Keys]
* [[Notepad:Change Timezone| Change Timezone]]
* [http://datatag.web.cern.ch/datatag/howto/tcp.html Gigabit Network]
* [[Notepad:Syncookie| Syncookie]]
* [[Notepad:Local Mount| Local Mount]]
* [[Notepad:SWAP| SWAP]]
* [[Notepad:depmod| depmod]]
* [[Notepad:Chain of IP addresses| Chain of IP addresses]]
* [[Notepad:Xterm startup|Xterm startup]] with different colors and font sizes
* [[Notepad:RPM - YUM Platform]]
* [http://fedoraproject.org/wiki/YumUpgradeFaq In place upgrade of Fedora Core by yum]
* [http://www.cyberciti.biz/tips/rhel-centos-fedora-linux-iscsi-howto.html CentOS / Red Hat Linux: Install and manage iSCSI Volume]
* [https://www.certdepot.net/rhel7-configure-ldap-directory-service-user-connection/ Configure a LDAP directory service ]
* [[Notepad:NetworkManager Configuration| NetworkManager Configuration]]
* [http://bobpeers.com/technical/telnet_imap Accessing IMAP email accounts using telnet.]
* Enable service syslog to have /var/log/messages populated
* Force a disk check on reboot
shutdown -rF now
* [http://www.rootninja.com/create-a-network-bridge-for-virtual-machines/ Create a network bridge for Virtual Machines]
* [http://www.rfxn.com/upgrade-centos-4-to-5/ Upgrade CentOS 4 to 5]
* [[Notepad:SSL CRT generation | Create a CRT for an SSL certificate]]
* [[Notepad:Samba | Properly configure Samba on Linux]]
* [[Notepad:Postfix | Postfix config]]
* [[Notepad:wget | Use wget to download full website]]
* [http://manuel.kiessling.net/2013/03/19/converting-a-running-physical-machine-to-a-kvm-virtual-machine/ Converting a running physical machine to a kvm virtual machine]
* Generate XAUTH on a new host
xauth add `hostname`/unix:0 . `openssl rand -hex 32`
* yum versionlock - allows to lock an rpm
* install faster random for dns etc.
yum install haveged;
systemctl enable haveged;
systemctl start haveged
* [https://askubuntu.com/questions/73864/how-to-modify-an-invalid-etc-sudoers-file How to modify an invalud sudoers file]
sudo visudo -f /mnt/etc/sudoers
* [http://manuel.kiessling.net/2013/03/19/converting-a-running-physical-machine-to-a-kvm-virtual-machine/ Converting a running physical machine into a KVM virtual machine]
* Which Process is listening on a port
netstat -tulpn
* [https://www.unixarena.com/2018/05/how-to-recover-grub-on-rhel-7-centos-7.html/ Recover GRUB 2]
* Install all package from another machine
xargs yum -y install < file
* Create Default Home Directory
mkhomedir_helper username
* [[Notepad:crontab | Schedule crontab with lock]]
* [https://hackernoon.com/how-to-shutdown-your-servers-in-case-of-power-failure-ups-nut-co-34d22a08e92 Configure UPS shutdown frmo Linux with nut]
* [[Notepad:mc | Midnight Commander]]
* [[Notepad:nagios | Nagios]]
* [https://wiki.archlinux.org/index.php/Google_Authenticator Google Authenticator Setup]
* [https://www.svennd.be/software-raid-1-on-centos-7-eufi-running-system/ Boot from Centos 7 RAID 1 EUFI]
* [https://serverfault.com/questions/779634/create-a-directory-under-var-run-at-boot Create a directory under var at boot or startup]
use tmpfiles.d and have your package create at startup or boot a file or directory /usr/lib/tmpfiles.d/mydaemon.conf :
man tmpfiles.d
#Type Path            Mode UID      GID    Age Argument
d    /run/mydaemon  0755 myuser myuser  -  -
 
* [https://wiki.archlinux.org/index.php/Lm_sensors lm_sensors]
* [https://unix.stackexchange.com/questions/227017/how-to-change-systemd-service-timeout-value Change systemd Timeout]
* [https://jumpcloud.com/blog/sharing-google-authenticator-secret-keys-across-servers/ Google Authenticator Across Servers]
* Yum install with missing deps
rpm -Uvh --nodeps $(repoquery --location <module>)
* [[Notepad:LVM Snapshot| LVM Snapshot]]
* [https://www.linuxquestions.org/questions/slackware-14/how-to-configure-iptables-for-router-with-2-public-ip-addresses-4175618196/ Example routing iptables firewall]
* [[Notepad:Disable IPv6 | Disable IPv6]]
* [https://serverfault.com/questions/620019/smartctl-megaraid-how-to-find-the-right-device-node-for-an-adapter find the right device for smartctl]
* ssh into a machine without a terminal '''<nowiki>-T</nowiki>'''
* [https://unix.stackexchange.com/questions/620427/how-to-detect-and-clean-up-junk-journal-files Clean Out Journal]
  sudo journalctl --vacuum-time=3weeks
* [https://www.jamescoyle.net/how-to/323-reclaim-disk-space-from-a-sparse-image-file-qcow2-vmdk Reclaim disk space from a sparse image file (qcow2/ vmdk)]


== MySQL ==
== MySQL ==
* [[Notepad:UTF8|UTF8 ]]
* [[Notepad:UTF8|UTF8 ]]
* Get a list of processes to kill
* Get a list of processes to kill
  <pre class="brush:[SQL]">
  <syntaxhighlight lang='SQL' line>
  SELECT GROUP_CONCAT(CONCAT('KILL ',id,';') SEPARATOR ' ')  
  SELECT GROUP_CONCAT(CONCAT('KILL ',id,';') SEPARATOR ' ')  
  'Paste the following query to kill all processes'  
  'Paste the following query to kill all processes'  
  FROM information_schema.processlist  
  FROM information_schema.processlist  
  WHERE user<>'system user'
  WHERE user<>'system user'
  </pre>
  </syntaxhighlight>


* install latest MariaDB
* install latest MariaDB
Line 177: Line 112:
== SC Backup ==
== SC Backup ==
*[[Notepad:Dell OpenManage | Dell Openmanage Install]]
*[[Notepad:Dell OpenManage | Dell Openmanage Install]]
== Matricom gBox Q ==
*[[Notepad:qBox Root | gBox Q root]]


== KVM ==
== KVM ==
Line 275: Line 207:
** Load balance instances back to all
** Load balance instances back to all


== Hackintosh ==
== [[Notepad:Hackintosh | Hackintosh Tricks]] ==
* [https://github.com/CloverHackyColor/CloverBootloader/releases Clover Releases]
* [https://github.com/jerw84/Z87-D3H Switch from Clover to OpenCore]
* [https://www.howtogeek.com/302942/how-to-figure-out-whats-preventing-your-mac-from-sleeping/ How to tell what's preventing sleep]
pmset -g assertions
* [https://www.google.com/search?client=firefox-b-1-d&q=clover+5122+to+5126 Clover 5122 to 5126]
These are the steps
# replacing the drivers > UEFI > AptioMemoryFix.efi with OpenRuntime.efi
# Also, add OcQuirk.efi (More Info: https://github.com/ReddestDream/OcQuirks)
# select: config.plist/Quirks > DisableIoMapper
* 10GbE Support [https://www.insanelymac.com/forum/topic/330614-marvell-aquantia-10-gb-ethernet-support-thread/ Marvel Aquantia 10GBE patch ]
Kext to patch
com.apple.driver.AppleEthernetAquantiaAqtion
Find
41C70424 00000000 E9
Replace
41C70424 01000000 E9
comment
Marvell AQC107 10GBE Patch


* Monterey 10GBE Patch by Mieze [https://www.insanelymac.com/forum/topic/330614-marvell-aquantia-10-gb-ethernet-support-thread/page/15/?tab=comments#comment-2760408 Monterey Patch by Mieze]
== [[Notepad:Samba | Samba/Active Directory/Bind]] ==
We've got to modify the patch.
You need to find
41 c7 45 00 00 00 00 00 e9
and replace it with
41 c7 45 00 01 00 00 00 e9


== Firefox ==
== Firefox ==
Line 311: Line 216:
to set the textsize on high res displays
to set the textsize on high res displays


== Wireguard==
== Wireguard ==
=== [https://serverfault.com/questions/1013535/unable-to-configure-wireguard-to-use-secondary-ip-address-instead-of-main-ip-add Wireguard using a secondary interface with iptables help]


== Links ==
* [https://blog.scottlowe.org/2021/06/28/using-wireguard-on-mac-via-cli/ Using WireGuard on macOS via the CLI]
* [https://blog.scottlowe.org/2021/08/04/starting-wireguard-interfaces-automatically-launchd-macos/ Starting Wiguard Automatically on a Mac]
=== [https://serverfault.com/questions/1013535/unable-to-configure-wireguard-to-use-secondary-ip-address-instead-of-main-ip-add Wireguard using a secondary interface with iptables help] ===
=== IP link example ===
ip link add wgpillgram type wireguard
wg setconf wgpillgram /dev/fd/63
ip -4 address add 172.26.27.1/24 dev wgpillgram
ip link set mtu 1420 up dev wgpillgram
ip -4 route add 10.26.27.5/32 dev wgpillgram
----
----
{{wiki}}
{{wiki}}

Latest revision as of 22:52, 26 February 2024

Unfiled

  • See the whole drive bash tool
  ncdu
 #threadTree treechildren::-moz-tree-row(odd) {
  -moz-appearance: none !important;
  background-color: #your_color_here !important; }
 
 #threadTree treechildren::-moz-tree-row(odd, selected) {
  background-color: Highlight !important;
 }

Windows

C:\WINDOWS\system32>PowerCfg /SETACVALUEINDEX SCHEME_CURRENT SUB_PROCESSOR IDLEDISABLE 000
C:\WINDOWS\system32>PowerCfg /SETACTIVE SCHEME_CURRENT
 DISM /Online /Cleanup-Image /RestoreHealth /source:WIM:F:\Sources\Install.wim:1 /LimitAccess 
 DISM /Online /Cleanup-Image /RestoreHealth /source:F:\sources /LimitAccess

URLs

Linux Tricks

Linux stuff I often have to lookup. Just my personal list of things.

MySQL

  • UTF8
  • Get a list of processes to kill
 SELECT GROUP_CONCAT(CONCAT('KILL ',id,';') SEPARATOR ' ') 
 'Paste the following query to kill all processes' 
 FROM information_schema.processlist 
 WHERE user<>'system user'
  • install latest MariaDB
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
  • Move/Rename a DB to another
mysql -u username -ppassword old_db -sNe 'show tables' | while read table; \ 
   do mysql -u username -ppassword -sNe "rename table old_db.$table to new_db.$table"; done
  • database dump without charset
  mysqldump -u <user> -p --skip-add-locks --skip-set-charset <DB> <tables ...>
  • Disable foreign key checks in a session
SET FOREIGN_KEY_CHECKS=0;

SSL Certificates

Version Control

  git update-index --chmod=+x filename.sh

Oracle

SC Backup

KVM

QNAP

Zend Framework

Video ffmpeg

Convert wmv to mp4

ffmpeg -i <input> -c:v libx264 -c:a aac -strict -2 -q:a 100 -crf 23 <output>

Zimbra

Working with the following for chain.pem:

-----BEGIN CERTIFICATE-----
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw
WhcNMjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg
RW5jcnlwdDELMAkGA1UEAxMCUjMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
AoIBAQC7AhUozPaglNMPEuyNVZLD+ILxmaZ6QoinXSaqtSu5xUyxr45r+XXIo9cP
R5QUVTVXjJ6oojkZ9YI8QqlObvU7wy7bjcCwXPNZOOftz2nwWgsbvsCUJCWH+jdx
sxPnHKzhm+/b5DtFUkWWqcFTzjTIUu61ru2P3mBw4qVUq7ZtDpelQDRrK9O8Zutm
NHz6a4uPVymZ+DAXXbpyb/uBxa3Shlg9F8fnCbvxK/eG3MHacV3URuPMrSXBiLxg
Z3Vms/EY96Jc5lP/Ooi2R6X/ExjqmAl3P51T+c8B5fWmcBcUr2Ok/5mzk53cU6cG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HyGO0aoSCqI3Haadr8faqU9GY/rOPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CI
rU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY9umbbjANBgkq
hkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL
ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ
3BebYhtF8GaV0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KK
NFtY2PwByVS5uCbMiogziUwthDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5
ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJwTdwJx4nLCgdNbOhdjsnvzqvHu7Ur
TkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC
jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc
oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq
4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA
mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d
emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
-----END CERTIFICATE-----

AWS

letsencrypt certonly --webroot -w /var/www/mydomain -d mydomain.com -d www.mydomain.com -w /var/www/cool-site -d cool-site.com -d www.cool-site.com
    • deploy new cert to all
    • upload into AWS *Load Balance* *Listeners* *SSL Certificate* (We get a weird error but it works)
    • Load balance instances back to all

Hackintosh Tricks

Samba/Active Directory/Bind

Firefox

about:config

layout.css.devPixelsPerPx

to set the textsize on high res displays

Wireguard

Links

Wireguard using a secondary interface with iptables help

IP link example

ip link add wgpillgram type wireguard
wg setconf wgpillgram /dev/fd/63
ip -4 address add 172.26.27.1/24 dev wgpillgram
ip link set mtu 1420 up dev wgpillgram
ip -4 route add 10.26.27.5/32 dev wgpillgram



<insert>googlesearchwiki</insert> <insert>paypal</insert> <insert>analytics</insert>